<bgsound id = snd1>
<script language=javascript>
snd1.src = "song.mid"
function playx(){
//alert("Next song")
snd1.src = "xMas.mid"
return false;
//return true;
}
</script>
<a href="javascript:void(playx())">Next song</a>
<a href="" onclick="return playx()">Again</a>
<a href="" onmousedown="return playx()">Why this link don't work</a>
Why the 3rd link don't work but the second work.
Thank you for answer.
: To call a function for which you do not expect a return value, do this:
:
: <a href="javascript:void(playx())">Click Me</a>
:
:
:
: : : : <bgsound id = snd1>
: : : : <script language=javascript>
: : : : snd1.src = "song.mid"
: : : :
: : : : function playx(){
: : : : //alert("Next song")
: : : : snd1.src = "xMas.mid"
: : : : return true;
: : : : }
: : : :
: : : : </script>
: : : :
: : : : <a href="" onmousedown="playx(); return false;">Next song</a>
: : : :
: : : :
: : : : how to click the link and change the music to the next song. The above code don't work.
: : : :
: : : : Thank you.
: : : :
: : : try
: : : <a href="playx()"......
: : :
: : : C:\Dos
: : : C:\Dos Run
: : : Run Dos Run
: : :
: : :
: : :
: : The correct code to run a javascript function using the anchor is:
: :
: : <a href="javascript:playx()">
: :
: : The code above assumes that playx() is a link to another page. You can also use the onclick() event.
:
:
To err is human, but to really foul things up requires a computer. (Farmers Almanac) 
:
: