Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: RE: expected ';' error..


Message #1 by Andrew Polshaw <andrewp@w...> on Mon, 2 Dec 2002 12:32:54 +0530
thanks for the help..
you bullseye the key!!!
ur great!  :)'


> >From: "kriz buenaventura" <vickriz@i...>
>Reply-To: "JavaScript HowTo" <javascript_howto@p...>
>To: "JavaScript HowTo" <javascript_howto@p...>
>Subject: [javascript_howto] expected ';' error..
>Date: Fri, 29 Nov 2002 08:37:18
>
>pls help me find my error here's my whole code..
>
>*****javascript****
>
>function popupWin() {
>text =  "<html>\n<head>\n<title>Splash Window - Spawn</title>\n";
>text += "<script language='JavaScript'>\n";
>text += "function popupLogWin() {\n";
>text += "msg = '<html>\n<head>\n<title>Login Window -
>Spawn</title>\n</head>\n';";
>text += "msg += '<body>\n';";
>text += "msg += '<form name="myform" method="POST"
>action="formvalidate.htm" enctype="text/plain" onsubmit="return
>validateForm(this)">\n';";
>text += "msg += '<table>\n<tr>\n<td>FullName:</td>\n<td><input type="text"
>name="fullname" size="32"></td>\n';";
>text += "msg += '</tr>\n<tr>\n<td>Email Address:</td>\n<td><input
>type="text" name="validemail" size="32"></td>\n';";
>text += "msg += '</tr>\n<tr>\n<td colspan="2">\n';";
>text += "msg += '<input type="submit" value="Register"
>name="submit">&nbsp;&nbsp;or&nbsp;&nbsp;
>      				<a href="javascript:document.myform.submit
>();">Submit</a>\n';";
>text += "msg += '</tr>\n</table>\n</form>\n';";
>text += "}\n";
>text += "function winProp(msg) {\n";
>text += "newWindowProp = window.open
>('','newWin','left=450,top=300,width=500,height=400');\n";
>text += "newWindowProp.document.write(mgs);\n";
>text += "setTimeout('closeWinProp(newWindowProp)', 7000);\n";
>text += "}\n";
>text += "function closeWinProp(newWindowProp) {\n";
>text += "newWindowProp.close();\n";
>text += "}\n";
>text += "</script>\n";
>text += "</head>"
>text += "<body onLoad="popupLogWin()" bgcolor="white" text="black"
>link="blue" vlink="purple" alink="red">\n";
>text += "<center>\n<br>";
>text += "<a href='http://javascript.internet.com/new'
>target='_blank'><h2>Polmap Encoding</h2></a>";
>text += "</center>\n</body>\n</html>\n";
>setTimeout('windowProp(text)', 2000); 		// delay 2 seconds before
>opening
>
>}
>function windowProp(text) {
>newWindow = window.open
>('','newWin','left=450,top=300,width=500,height=400');
>newWindow.document.write(text);
>setTimeout('closeWin(newWindow)', 7000);	// delay 7 seconds before
>closing
>}
>function closeWin(newWindow) {
>newWindow.close();				// close small window and
>depart
>}
>
>
>****html*****
>
><body onLoad="popupWin()" bgcolor="white" text="black" link="blue"
>vlink="purple" alink="red">
><p><a href="javascript:spla****
>
('splashwin', 'file:///C|/cygwin/usr/local/apache/upload/polmap/PreEncoding
>/sort_table1.htm', 450, 250, 550, 350, 0, 0, 0, 0, 0)"
>target="_self">splashwin</a></p>
>
>***end******
>
>
>i have two error here.. expected ';'
>                         object expected.
>
>pls help.
>
>
>
Difficult to debug this sort of stuff but try breaking up the line with 
the 
script tag:
text += "<script language='JavaScript'>\n";
=>
text += "<scr" + " ipt language='JavaScript'>\n";

The HTML parser is not sophisticated enough to know this isn't a script 
block just because it's being quoted.

Joe


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


  Return to Index