|
Posted by Wings on 09/19/05 21:54
I don't know about the script, but if a user turns your music off, it
probably isn't too likely that he will want to turn it back on, so I
wouldn't concern myself about turning it back on.
"Gaffer" <gafferNoTSpam@ntlworld.com> wrote in message
news:ZqjXe.9237$QU3.8540@newsfe1-win.ntli.net...
>I almost have the below script working fine. When the webpage loads you
>need to click on the button to start the music, which it does, and then
>click on the button to turn it off again. However, when you click the 'turn
>music off' button the music does go off, but the button doesn't change back
>to the 'turn music on' one. So the music can't be turned back on again
>unless you refresh the page. Thanks.
>
>
>
>
> --------------------------------------------------------
>
> <script language="JavaScript"><!--
> function musicOff() {
> document.midi.stop()
> }function musicOn() {
> document.midi.play()
> }
>
>
> function changeButton() {
> if (document.onoff.B1.value=='Turn music on')
> {
> document.onoff.B1.value='Turn music off';
> musicOn()
> }
>
>
> else {
> document.onoff.B1.value='Turn music off';
> musicOff()
> }
> }
> //-->
> </script>
> <embed name="midi" src="psychotune.mp3" width="0" height="0"
> autostart="false">
> <form name="onoff">
> <input type="button" value="Turn music on" name="B1"
> onClick="changeButton()" style="color: #000000; background-color: #FFFFFF;
> font-family: Tahoma; font-size: 7pt">
>
> </form>
>
>
> --------------------------------------------------------
>
> --
> Gaffer
>
Navigation:
[Reply to this message]
|