Object Expected!!
Help please anyone!
Object Expected at line 80, below is javascript code, Below that is the offending line(s)!!
function call_song(){
var song = document.theForm.txtsong.value;
var artist = document.theForm.txtartist.value;
var doclocation = "C:\\Documents and Settings\\Callum\\My Documents\\Music Manager\\Music\\";
parent.main.document.write('<html><head><title>' + Artist + ' - ' + Song + '</title></head>');
parent.main.document.write('<body>');
parent.main.document.write('<img src="searchresults.jpg">')
parent.main.document.write('<OBJECT ID="mediaPlayer" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-" 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">');
parent.main.document.write('<PARAM NAME="fileName" VALUE="' doclocation + artist + ' - ' + song + '">');
parent.main.document.write('<PARAM NAME="animationatStart" VALUE="true">');
parent.main.document.write('<PARAM NAME="transparentatStart" VALUE="true">');
parent.main.document.write('<PARAM NAME="autoStart" VALUE="false">');
parent.main.document.write('<PARAM NAME="showControls" VALUE="true">');
parent.main.document.write('</OBJECT>');
parent.main.document.write('</body>');
parent.main.document.write('</html>');
}
</script>
<form name="theForm">
<p>Artist:
<input type="text" name="txtartist">
<br>
Song:
<input type="text" name="txtsong">
<br>
Line 80 <input type="button" value="search" onClick="call_song();">
<br>
Make sure start each word with a capital letter! </p>
</form>
Cheers to anyone who can help!!
__________________
Apocolypse2005, I'm a programmer - of sorts.
|