'song' is undefined
Heres the code if anyone could read through and check it out for me?!
<script language="javascript" type="text/javascript">
theForm is the form where this code is supposed to get its variables from.
artist_find and song_find are textboxes within the form where the variables will entered in.
var song = document.theForm.song_find.value; //this is supposed to make the value of the textbox a variable
var artist = document.theForm.artist_find.value; //same as above
Below is the code which writes the variables out and creates a new html page:
function call_song(artist, song){
document.write('<html>'); //this is meant to write out a new html page
document.write('<body>'); //and it does do that, i've tried an tested it
document.write('<img src="searchresults.jpg">')
document.write('<OBJECT ID="mediaPlayer" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" STANDBY="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject">');
document.write('<PARAM NAME="fileName" VALUE="N:\Music Manager\Music\' + artist + song + ''">');
document.write('<PARAM NAME="animationatStart" VALUE="true">');
document.write('<PARAM NAME="transparentatStart" VALUE="true">');
document.write('<PARAM NAME="autoStart" VALUE="false">');
document.write('<PARAM NAME="showControls" VALUE="true">');
document.write('</OBJECT>');
document.write('</body>');
document.write('</html>');
}
</script>
__________________
Apocolypse2005, I'm a programmer - of sorts.
|