Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 3rd, 2006, 12:23 PM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default 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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object expected darkhalf Javascript 1 September 28th, 2006 05:32 PM
object expected crmpicco Javascript 3 April 19th, 2006 09:07 AM
object expected line 0 rcard Javascript 0 June 22nd, 2005 01:35 PM
object expected shoakat Classic ASP Databases 3 September 20th, 2004 08:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.