Hi everybody,
I have been trying to execute a java script function during the Onload event
of a html page generated by a servlet.The code is below:

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class Script extends HttpServlet
{

public void doGet(HttpServletRequest req,HttpServletResponse res) throws
ServletException,IOException
{
PrintWriter out = res.getWriter();
res.setContentType("text/html");

out.println("<html> <head> <script language = JavaScript>");
out.println("<!-- function openWindow(theURL,winName,features) {");
out.println(" window.open(theURL,winName,features);} -->");
out.println("</script>");
out.println("</head>");
out.println("<body bgcolor= #FFFFFF leftmargin= 0 topmargin= 0 marginwidth=
0 marginheight= 0  onLoad=
openWindow('http://localhost:8080/examples/servlet/testing','testing','scrol
lbars=yes,resizable=no,location=no,width=768,height=550')>");
out.println("<p>Start</p>");
out.println("</body> </html>");
}
}
So as u can see as soon as a call to the Script servlet is made
simultaneously another window with the output of the test servlet should
also get loaded,but I am getting a Java script error on the 6th out.println
statement (ie) where the body tag begins,stating Object required on line 6
char 1.Is there any mistake of escaping the values of the properties of the
body tag.
Can anybody help me out with this problem!!
Anticipating your help.
Thanx in Advance

Karthikeyan A.R

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to