> -----Original Message-----
> From: udhay kumar [mailto:[EMAIL PROTECTED]]

> Hi,
> 
> Any body have done modal window in javascript which will 
> restrict the user 
> to access the parent browser window.
> 
> i have tried some of them available in javascript like
> 
> window.showModalDialog()
> 
> but when i try to submit from the modal window it throws 
> another window.

---////---

The secret is to use a <IFRAME SRC=`<%= request.getContextPath()+"/sexy.jsp"
%>'.
The internal frame loads another jsp behind the scenes in the dialog.

Consequences 
=============

your action form must be stored in session scope (so that controller 
response survives the redirection to the internal frame)

any controller response, the setting of attributes, must be stored 
in the session scope (ditto the same reason)

All your form submits are in the internal frame. 

Now here's a hot tip! Use a tiny jsp to close the modal frame
when you want to complete the form. When the user submits the HTML
form in the internal frame forward to the JSP to automatic
close the modal window.

// close.jsp
<html>
<script language="javascripty" >
closePopup() { window.close(); }
</script>
<body onload="closePopup" >
</body>
</html>

The GOAT (Greatest Of All Time) is back in effect.
--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923


***********************************************************************
      Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB 
Regulated by the Financial Services Authority
***********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to