File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Modal dialog for a popup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Modal dialog for a popup" Watch "Modal dialog for a popup" New topic
Author

Modal dialog for a popup

sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi

I have many popups in my webapplication(Even though i tried restricting them as its always pain with the popups) ......and i am facing a problem which most of you might be aware of....

When the user opens a popup, and then he comes to the main page and refreshes that and he submits the popup which need to pass some data to the parent window (or might need to pick data from parent window)

Hence the parent window is getting lost .how can i prevent this with out changing the window.open to modal window( because i need to modify my code lot to support modal windows and this wont work in netscape too)

Is there anyway ?? i tried using self.focus() on the onblur event of the popup jsps .....but thats not allowing me to enter the fields in that page (as it keeps on focussing that popup)

Can any one suggest me a better way of handling this ??

Regards
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Try this, I know it works with Mozilla, IE, and Firefox



Eric
[ May 24, 2005: Message edited by: Eric Pascarello ]
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
how can i prevent this with out changing the window.open to modal window( because i need to modify my code lot to support modal windows and this wont work in netscape too)

Hi eric

window.showDialog is nothing but a modal dialog right ?? the problem is t he way in which the data in transferred from child to parent differs a lot if i use that window.showModalDialog() .........so i need to change in lot of places

and i am sure that the window.showModal wont work in Netscape
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can try something like this, but it is not a great solution:



Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Modal dialog for a popup
 
Similar Threads
Using ModalDialogs instead of Window.open for popups
Pop Up
popup window changed to internal iframe. problem using window.opener
HttpSession issue with Popups
Check if popup window is already open from parent window?