Reload Parent page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a page, "parent.aspx" , which will open a new Child Window
"child.aspx" . user will enter some text on the child window.

Would like to know how to refresh the parent page at the same parent window,
after the user click on "OK" button. when press on "OK " button, the child
window will do some processing and close
 
You have to do this with JavaScript. Do something like this in the child
window:

<script>
window.opener.location = "mylocation.htm";
</script>

Kind regards,
Nikander & Margriet Bruggeman
 
chuayl said:
i have a page, "parent.aspx" , which will open a new Child Window
"child.aspx" . user will enter some text on the child window.

Would like to know how to refresh the parent page at the same parent
window, after the user click on "OK" button. when press on "OK "
button, the child window will do some processing and close

After processing, insert this code (VB.NET):

'Form the script that is to be registered at client side.
Dim scriptString as String = "<script language=JavaScript>"
scriptString += "window.opener.location.href=window.opener.location.href;<"
scriptString += "/"
scriptString += "script>"
If(Not IsClientScriptBlockRegistered("clientScript"))
Page.RegisterStartupScript("clientScript", scriptString)
End If
 
Back
Top