If you are POSTing the form data, I think you'd have to resort to some
javascript. something like:
in frameB (the lower frame), capture the onSubmit(), call a javascript
function in frameA that reads the form data into a bunch of hidden fields in
a form in frameA and then submit the new form.
Like Mike, if anyone has a non-JavaScript solution, I'd love to hear about
it! Actually, I haven't tried setting the target attribute of a form tag,
you might try that too (set it to the name of the frame you want--wonder if
this would work with window names too).
AFAIK, there's no way to do it once your servlet has gotten hold of the
form--no way for your servlet to specify in the response headers what
window/frame it should target =)
>From: Mike McGuinness <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Form processing - frameset
>Date: Tue, 14 Aug 2001 11:05:12 -0400
>
>Excellent question,
>
>I wish I new the answer because I want to do the same thing. :)
>
>There is no purely server-side way (that I know of) to have the servlet
>redirect to a
>different frame; that's all client side stuff. I've been through the
>http 1.1. spec
>and there does not seem to be a solution there. As far as http is
>concerned, a
>client request from a place (frame, browser, etc) will generate a
>server response
>to the same place.
>
>If you submit the form as a link then you can add something
>like "TARGET=TOP_FRAME" to the "A" tag.
>
>Without using javascript, what I did was gather the parameters from the
>form and created a link with a query string. The query string contained
>the
>form parameters. When the user clicked on the link, the response
>was displayed in the appropriate frame.
>
>I don't believe there is a complete html-only solution without using
>javascript.
>
>Hope this helps,
>
>Mike
>
>
>
>Patrick Fong wrote:
>
>>Hi
>>
>>I have a servlet which handles form processing. The form lies in a two
>>frame browser window. After processing the data from the form I want to
>>sendRedirect to the top level window. Is there a setting in the HTTP
>>heading that I can set to allow for this? Or is this a Javascript thing?
>>How can I execute JavaScript in Java servlets? How may I go about solving
>>this dilemma?
>>
>>TIA.
>>
>>Patrick
>>
>>___________________________________________________________________________
>>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
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
___________________________________________________________________________
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