G
Gaffer
Is it possible to change the following code so that the music is 'off' when
the page is loaded and the user gets the option to turn it on?
---------------------------------------------------
<script language="JavaScript"><!--
function musicOff() {
document.midi.stop()
}function musicOn() {
document.midi.play()
}
function changeButton() {
if (document.onoff.B1.value=='Turn music off') {
document.onoff.B1.value='Turn music on';
musicOff()
}
else {
document.onoff.B1.value='Turn music off';
musicOn()
}
}
//-->
</script><embed name="midi" src="psychotune.mp3" width="95" height="95"
hidden>
<form name="onoff">
<input type="button" value="Turn music off" name="B1"
onClick="changeButton()" style="color: #000000; background-color: #FFFFFF;
font-family: Tahoma; font-size: 10pt">
</form>
the page is loaded and the user gets the option to turn it on?
---------------------------------------------------
<script language="JavaScript"><!--
function musicOff() {
document.midi.stop()
}function musicOn() {
document.midi.play()
}
function changeButton() {
if (document.onoff.B1.value=='Turn music off') {
document.onoff.B1.value='Turn music on';
musicOff()
}
else {
document.onoff.B1.value='Turn music off';
musicOn()
}
}
//-->
</script><embed name="midi" src="psychotune.mp3" width="95" height="95"
hidden>
<form name="onoff">
<input type="button" value="Turn music off" name="B1"
onClick="changeButton()" style="color: #000000; background-color: #FFFFFF;
font-family: Tahoma; font-size: 10pt">
</form>