Developing Web-based Application. How to make popup windows with controls on it for users to fill

Question is that i am developing an application which is workflow and web-based application. How do i create popups in a web-based application. Now the popup dialogue window should also contain controls on it … If any one can help me out then that would be great. Some code or tutorial would be highly appreciated.

Regards,

Jawad Rana

Subject: Developing Web-based Application. How to make popup windows with controls on it for users to fill …

If you look around you’ll probably find an article or two telling how to do this, but basically here’s the technique for doing it with JavaScript:Use window.open to launch the new dialog window. There’s a dialog to make the window modal but I believe you have to use signed JS for this, which is such a pain that I never bother.

The dialog window will use window.opener to locate the original window (in case it needs to read any field information from it). Or, the window.open call can supply information on the URL (useful if field information is needed on the server to lookup keyword lists, for instance).

If you couldn’t open the dialog as modal, then the original window will need a global JS variable that contains a handle to the open dialog window. An onfocus event of the window will return focus to the dialog. If the dialog has been closed, an error trap will clear this variable and allow focus to rest on the original window.

An “OK” control on the dialog will use window.opener to update fields in the original window so as to report the user’s selections, clear the original window’s global link to the dialog window, and close the dialog.

Or, if you’re a Java enthusiast, you could do it more directly with a little (i.e. 1x1 pixel) applet on the original page.

Subject: One thing to bear in mind…

is that more and more web users are using pop-up blockesr, so you will need to include something to alert them to the fact that they would need to allow pop-ups when using your form.

Subject: RE: One thing to bear in mind…

These would generally qualify as “pop-ups I request”, though, which means that they can leave (in most blockers) the automatic pop-ups blocked. That will make them less likely to ignore your requirement and leave everything blocked.