Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts

    conflict with JS

    Hi,

    I am embedding some music stuff into my page but there is what 'perl thinks is a var' in the js and it doesn't like it.

    what's the best way to get aroundthis? I declared
    my $f

    and the error is supressed but the js still doesn't seem to run.

    Code:
    <script type="text/javascript">
    var player0 = $f("audio", "js/flowplayer/flowplayer-3.2.5.swf", {
    
    	// fullscreen button not needed here
    	plugins: {
    		audio: {
    			url: 'js/flowplayer/flowplayer.audio.swf'
    		},
    		controls: {
    			background: '#975566',
    			fullscreen: false,
    			height: 30,
    			autoHide: false,
    			scrubber: false,
    			time: false
    		}
    	},
    
    	clip: {
    		autoPlay: false,
    
    		// optional: when playback starts close the first audio playback
    		onBeforeBegin: function() {
    			$f("player").close();
    		}
    	}
    
    });
    </script>
    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Is $f supposed to be a perl var or a javascript var?

    If it's a perl var where you're having problems interpolating, then try ${f}

    eg:
    Code:
    ${f}("player").close();

  • #3
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Thanks FishMonger.

    It was a JS var but, as it transpired, that wasn't the issue and I have it sorted now.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •