Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Iam using javascript code to open a new popup web page from my parent web page. I have an image button on the popup page. I have written code in to execute on the image button's click event. However every time I click on the image button it executes the code only after opening a new window of the same page. Is this a nature shown for any control in a pop-up form?

How can I make it to execute the click event on the same page(popup form) without opening a new window?

Many thanks!
S
Posted

1 solution

This sounds like it could be an issue with modal dialogs (are you using one?) where you cant post back the page in the modal dialog.

The workaround is to have a generic popup window that contains an iframe that then contains the actual popup. The iframe is then free to postback to itself without opening a new window.
 
Share this answer
 
Comments
sujanir 9-Nov-10 22:34pm    
Thanks for that.

Yes, Iam using a modal dialog and I was not aware of postback issues in popup forms. Can you point me to an example code on Iframe/popup inside iframe.
David Ewen 9-Nov-10 23:28pm    
The article at http://www.codeproject.com/KB/aspnet/IFrameParams.aspx seems to cover the issue.
sujanir 10-Nov-10 15:17pm    
Perfect, Works well now! Thanks very much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900