Close popup refresh parent

Kim

New member
Joined
Apr 18, 2005
Messages
3
Programming Experience
Beginner
Hi all,

This is the code i use for closing a popup window and refreshing the parent. The parent needs to be refreshed because in the pop up people can select something and then what they selected must come in the parent.:

Dim writer As HtmlTextWriter
writer = New HtmlTextWriter(context.Response.Output)
writer.WriteBeginTag("script")
writer.WriteAttribute("language", "javascript")
writer.Write(HtmlTextWriter.TagRightChar)
writer.Write("if (window.opener) { opener.window.location=opener.window.location; window.opener.focus(); } window.close();")
writer.WriteEndTag("script")

does anyone know what could be wrong with this script? I use 'opener.window.location=opener.window.location' instead of 'window.opener.location.reload()' because with the last one you get an ie pop up that says that you must click retry for refreshing the page. Now my problem with the code that i use know is the following:
On the parent page you click a button, then you get the pop up you select something and push another button, the pop up is closed but my page doesn't refresh, then when i click the button on the parent page for going to the pop up he loads the pop up and refreshes my page....

Thx

Kim
 
Back
Top