You can have the sevlet return a html page which has an onload event
handler. Onload="window.parent.FillTable(ResultSet_JavaScriptObject)". Kind
of CallBack.
The Servlets return page can have code to contruct the result set as an
array of javascript objects(which will happen when the response html page
is loaded in the client browser.) And you can load the Servlet into a hidden
frame.
This solution is based on the assumption that the client has Frames
capability.
Hope it helps
- Manikumar
-----Original Message-----
From: Kevin Mukhar [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 29, 1999 12:03 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaScript and Servlets
Antonio Villafana wrote:
>
> Hey Guys and gals,
> Here is another question for the group... Can I call a
java-servlet from
> within a javascript function
Yes. You can do form.submit().
> and return a resultset to the function, which
> will populate different form fields on the web page?
No. Servlet responses are sent back to the browser through the
HttpServletResponse object. The browser interprets what it gets as
an HTTP
compliant response. There's no way to return an object to a
Javascript function.
You can use the servlet to populate the form fields and send the
entire page
back.
Kevin Mukhar
___________________________________________________________________________
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
___________________________________________________________________________
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