Sue Stephen
10-31-2004, 04:16 PM
Hi,
I am using socket on linux to write a html page to left frame of a frameset from right frame to the client.
In C++ program......., in the middle of printing right frame:
-----------------------
string doc = "<html><body>";
doc += "<script language=\"javascript\">";
//other things can be added here...
doc += "</script>";
doc += "<input type=\"button\" value=\"Go\"></body></html>";
string write_menu = "top.frames[\"leftframe\"].document.write('" + doc + "');";
--------------------
write_menu is sent to client by socket.
However, each time I put the javascript tag <script></script> in doc, browser gives me "unterminated string constant" error.
By referring to:
http://www.webdeveloper.com/forum/showthread.php?threadid=17754&highlight=unterminated
I changed the line to "<\/script>", but it still does not work.
Could someone give some suggestions? Thank you very much for your help.
Sue
I am using socket on linux to write a html page to left frame of a frameset from right frame to the client.
In C++ program......., in the middle of printing right frame:
-----------------------
string doc = "<html><body>";
doc += "<script language=\"javascript\">";
//other things can be added here...
doc += "</script>";
doc += "<input type=\"button\" value=\"Go\"></body></html>";
string write_menu = "top.frames[\"leftframe\"].document.write('" + doc + "');";
--------------------
write_menu is sent to client by socket.
However, each time I put the javascript tag <script></script> in doc, browser gives me "unterminated string constant" error.
By referring to:
http://www.webdeveloper.com/forum/showthread.php?threadid=17754&highlight=unterminated
I changed the line to "<\/script>", but it still does not work.
Could someone give some suggestions? Thank you very much for your help.
Sue