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 Using ModalDialogs instead of Window.open for popups Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Using ModalDialogs instead of Window.open for popups" Watch "Using ModalDialogs instead of Window.open for popups" New topic
Author

Using ModalDialogs instead of Window.open for popups

sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi

We have a big webapplication with innumerable popups in our application and we have support only for Internet Explorer . With the increased complexity and troubles faced by using window.open , we are planning to replace them with the modal dialogs which included changes in major amount as the interacation between the pareny and the popup differs a lot ....

is that a good idea to adopt to these Modal Dialogs ?? And the complexities which we faced while using the normal popup is

1. User opening multiple popups and not closing them ...(Ofcouse now we had adopted the strategy of opening the same window when the user clicks the same popup link again)
2. On Clicking the button in the popup , we need to pass the data to the parent and then refresh that ...But if the user has done some operations in the parent , the parent window object is lost thus making the operation a failure .

and many more..
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
modal windows give you a very easy method to pass data back and forth too. Take a look at these examples here: http://www.faqts.com/knowledge_base/view.phtml/aid/876/fid/129

Eric
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi eric

Thanks for the info . But do u agree with the limitations which i mentioned in the above post , with regards to normal window.open() because there might be a way to overcome them too despite of going for Modal dialogs
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
I use both in all of my applications. If input is required then I use a modal window. Sometimes you need to forse people to use it. For regular pop ups, you can make the parent close them when it regains focus. That means you do not have to worry about windows just sitting there unused.

I been even getting away from modal windows and using dynamically positioned iframes, but that s a different story.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using ModalDialogs instead of Window.open for popups
 
Similar Threads
pop in IE vs Firefox
Help on popup windows
popup window changed to internal iframe. problem using window.opener
Modal dialog for a popup
Popup form, parent form