Bill,

Here's a suggestion....

When the user clicks on the submit button, process the order, and then
return a page containing only javascript
("window.close()").  Actually, you may want to also return text on the page
telling the user that the order has
been submitted, and that the window can be closed - just in case Javascript
is disabled on the user's browser.

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Hines, Bill
> Sent: Sunday, February 27, 2000 7:21 PM
> To: [EMAIL PROTECTED]
> Subject: Pop-Up Form Window?
>
>
> I'm here late on Sunday night trying to get a project done for
> this week, I
> have to demo it on Tues and there is one last part I can't figure out.
>
> My main JSP page has a list of items on it. There is a small
> graphic next to
> each item in the list that says "Order". When the user clicks
> that, the item
> number and description are sent to a servlet which pulls them from the
> session, creates an OrderItem bean and puts it in the session, then calls
> the JSP page with target="_blank". This page has a form that
> shows the item
> number and description and asks the user for the quantity.
>
> I want the user to be able to press the submit button to submit the order
> and close the window. If I put onSubmit="window.close()" in the
> <form> tag,
> the form data never gets put in the session. If I take the
> onSubmit out, it
> works great but the extra window sticks around and the item list
> redisplays
> there. How can I get the pop-up window to close and do the submit like I
> need?
>
> Thanks, Bill
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to