-
Buttons dont work in Opera only
Hi All,
I have used this javascript to make a very simple play and stop button for a music player, it all works fine in IE and Firefox but when I open the page in Opera the music plays and there is no control with the buttons can anyone help !
Here is a URL to my page in question:
http://www.eustonfishingclub.com/Gallery/index.html
THIS IS THE JAVASCRIPT THAT I HAVE COPIED
Code for Music Player:
<!-- Functions Code Block Start-->
<script>
/* Here we are creating two functions. The first to start a sound object playing and the second to stop a sound object from playing. */
//
// This function, when called will play the sound object
function EvalSoundPlay(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play();
}
// This function, when called will stop the sound object
function EvalSoundStop(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Stop();
}
</script>
<!-- Functions Code Block End-->
<!-- Here we are embedding the sound file/s. We give each embedded sound a 'name' that we can refer to in a JavaScript event call.
-----
// Note: You can have multiple sounds embedded but remember that each sound requires a different 'name' and each would require its own set of play/pause buttons. -->
<embed src="smooth_bgd.wav" autostart="false" width=0 height=0 name="sound1" repeat="true" loop="true" enablejavascript="true" />
THIS IS MY HTML:
<div class="musicPlayer"><img src="../Assets/Images/Global/play-button.png" alt="music play button" width="40" height="40" onClick="EvalSoundPlay('sound1')"/><img src="../Assets/Images/Global/stop_button.png" alt="music stop button" width="40" height="40" onClick="EvalSoundStop('sound1')"/></div><!-- End .musicPlayer -->
Thanks for Help
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks