P
Peter
1) I have a C# web application and what I am trying to do is create a popup window from a link on the parent window
2) the popup window will have a button and when a user clicks on the button the program should update a database, close the window and refresh the parent window.
My question is does anyone have a example of popup window wich will close it's self and refresh the parent window when a user clicks on a button?
I know there are countless examples of this with Java script, but I can get any of them working with ASP.NET. The biggest problem I have is with refreshing the parent window.
I have tried the following code in the popup window in the button click event, but I keep getting java script error:
'window.opener.document' is null or not an object.
this code is in the
private void butSave_Click(object sender, System.EventArgs e) {
string jscript = "<script language=\"javascript\">" +
"window.opener.refresh();" +
"</script>";
Literal1.Text = jscript;
}
Thanks
Peter
2) the popup window will have a button and when a user clicks on the button the program should update a database, close the window and refresh the parent window.
My question is does anyone have a example of popup window wich will close it's self and refresh the parent window when a user clicks on a button?
I know there are countless examples of this with Java script, but I can get any of them working with ASP.NET. The biggest problem I have is with refreshing the parent window.
I have tried the following code in the popup window in the button click event, but I keep getting java script error:
'window.opener.document' is null or not an object.
this code is in the
private void butSave_Click(object sender, System.EventArgs e) {
string jscript = "<script language=\"javascript\">" +
"window.opener.refresh();" +
"</script>";
Literal1.Text = jscript;
}
Thanks
Peter