ged12345 Posted January 2, 2009 Share Posted January 2, 2009 Hey all, A weird question here - I have an mp3 player embedded in a php file - these are the lines to set it up: <script type="text/javascript" src="<?php $siteDomain; ?>/flashmp3player/swfobject.js"></script> <script type="text/javascript" src="<?php $siteDomain; ?>/flashmp3player/ep_player.js"></script> <script type="text/javascript"> // <![CDATA[ var so = new SWFObject("<?php $siteDomain; ?>/flashmp3player/ep_player.swf", "ep_player", "301", "16", "9", "#FFFFFF"); so.addVariable("skin", "<?php $siteDomain; ?>/flashmp3player/skins/micro_player/skin.xml"); so.addVariable("playlist", "<?php $siteDomain; ?>/flashmp3player/playlist.xml"); so.addVariable("autoplay", "true"); so.addVariable("shuffle", "false"); so.addVariable("repeat", "true"); so.addVariable("buffertime", "1"); so.addVariable("key", "YOURUNIQUEKEY"); so.addParam("allowscriptaccess", "always"); so.write("flashcontent"); // ]]> </script> This is in a file called musicplayer.php I use frameset to call this and the main page, so that the mp3 player isn't reloaded on each separate page, causing a break in the music. The other file called is a php page also. I want to be able to switch the music on and off from the mainpage, as I want the mp3 player to be hidden otherwise (for the moment). The included .js files have an API to turn the music on and off - one of the calls being: EP_stop('ep_player'); Now, my question is, is it at all possible to reference this js script from this other .php;/html file and use the above call in another completely different page. I'm unfamiliar with javascript and any help would be exceedingly useful. Thanks, ged12345 Link to comment https://forums.phpfreaks.com/topic/139205-calling-javascript-in-one-page-from-a-separate-webpage/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.