V
Vijay Kerji
Hi,
Please go through the following scenario.
1)On Button click, Parent window opens a child window using
showModalDialog
2)Button is a server control and showModalDialog script is registered
using the following code:
string scriptblock = "<script language='javascript'>returnValue =
window.showModalDialog('Datagrid1.aspx', 'xxx');" +
"if(returnValue == 0) window.open('Webform1.aspx', '_self'); else
window.open('Datagrid1.aspx', '_self'); </script>";
Page.RegisterStartupScript("Launch_Report_Window",scriptblock);
3)In the Child window there is a SAVE server button control and the
following
code is added in PageLoad for the button:
Button_Save.Attributes.Add("onclick","javascript:window.returnValue
= 0;window.close();");
4)When OnSave button is clicked, a new child window is getting opened
though the modal window is closed, which is annoying.
Any intelligent guess/suggestoins are appreciated.
Thanks
Vijay K Kerji
Please go through the following scenario.
1)On Button click, Parent window opens a child window using
showModalDialog
2)Button is a server control and showModalDialog script is registered
using the following code:
string scriptblock = "<script language='javascript'>returnValue =
window.showModalDialog('Datagrid1.aspx', 'xxx');" +
"if(returnValue == 0) window.open('Webform1.aspx', '_self'); else
window.open('Datagrid1.aspx', '_self'); </script>";
Page.RegisterStartupScript("Launch_Report_Window",scriptblock);
3)In the Child window there is a SAVE server button control and the
following
code is added in PageLoad for the button:
Button_Save.Attributes.Add("onclick","javascript:window.returnValue
= 0;window.close();");
4)When OnSave button is clicked, a new child window is getting opened
though the modal window is closed, which is annoying.
Any intelligent guess/suggestoins are appreciated.
Thanks
Vijay K Kerji