AspNetAtoms.com daily updates on ASP.NET Tutorials, Articles, Authors and more. Subscribe to our newsletter and receive updates on ASP.NET resources on the Internet.

Categories

Recent Posts

How to open popup windows in IE/Firefox and return values using ASP.NET and Javascript : Suprotim Agarwal

Saturday, February 14 2009

With the forums flooded with questions of opening a popup window, passing values to the popup window and then return values back to the parent page using both Internet Explorer and Firefox, I decided to take a plunge into the subject and experiment with an easy implementation. This article explains how to transfer values between the Parent page and a Pop-up window. The code has been tested against IE7 and Firefox. Internet Explorer(IE) contains the showModalDialog() method which proves very effective while creating a modal dialog box and displaying a html document in it. One caveat being, showModalDialog() is not a W3C implementation. So it is not supported in Firefox (as of version 2.0.0.11). Firefox supports the window.open() method. However there is no built in functionality in Firefox that keeps the popup modal. At the most, you can use modal=yes to make the popup appear in front. However unlike the showModalDialog() in IE, you cannot restrict the user to access the parent page when the popup is opened in Firefox. In short, it is not truly modal. There are different ways to get around this problem, however in this article, we will only focus on exchanging values between the parent and popup page....

Read More:
How to open popup windows in IE/Firefox and return values using ASP.NET and Javascript : Suprotim Agarwal
Also See:
Handling the back button from server code : Bertrand Le Roy
WebChat : Steve C. Orr
Build an Anthem.NET "AJAX" Autosuggest TextBox : Peter A Bromberg
Building ASP.NET AJAX 3.5 Extender Controls : Matthew Ellis
Extending the ImageMap HTML Control with AJAX 1.0 Extensions : Bilal Haidar [MVP,MCT]

Post your comment

Comment