Link to home
Start Free TrialLog in
Avatar of Relegence
RelegenceFlag for Israel

asked on

Refresh parent page after closing a modalDialog window

Hello,

I am developing a C# asp.net application, where i am using a modalDialog window (opened by javascript).

I have 2 buttons in the modalDialod window - close, save.

When pressing each of the buttons, a new window is opened instead of closing the window (when pressing 'close') or closing the window and refreshing the parent window (when pressing 'save').

I have added <base target="_self"> to my modalDialog so that when i press the 'close' button it works fine now, the window is closed.

But, i still have a problem with the 'Save' button. When pressing 'Save' i want to refresh the parent window (window.parent.location.href = window.parent.location.href) and close the modalDialog. What happens is that a new window is opened and the parent window is not refreshed.

Any ideas?

Thanks,
Dana
Avatar of Swapnil
Swapnil
Flag of India image

Following may will you

ASP.NET Tip: Refreshing a parent .ASPX page from a child window
http://www.dotnetjunkies.com/WebLog/kevdaly/archive/2004/04/25/12107.aspx
Avatar of Relegence

ASKER

I cannot use window.opener becuase it is 'null'

and when i use window.parent i get the same window i am at (the modalDialog window)...

How can i refresh the opener??
ASKER CERTIFIED SOLUTION
Avatar of Relegence
Relegence
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial