1. Use window. open () to replace the pop-up window.
2. Use getbrowsertype () to determine the current browser and handle it accordingly.
Function getbrowsertype (){
VaR UA = navigator. useragent. tolowercase ();
If (UA. Match (/MSIE ([\ D.] +)/) return 1;
If (UA. Match (/Firefox \/([\ D.] +)/) return 2;
If (UA. Match (/chrome \/([\ D.] +)/) return 3;
If (UA. Match (/opera. ([\ D.] +)/) return 4;
If (UA. Match (/version \/([\ D.] +). * Safari/) return 5;
Return 0;
}
3. ie uses window. returnvalue to pass parameters to the parent window;
Chrome uses window. opener. returnvalue to pass parameters to the parent window, and CALLS window extension opener.doc ument. All. btngetlist. Click (); partial comfort parent window.
4. Define a control in the parent window <input type = "hidden" id = "btngetlist" onclick = "<% = PostBack () %>"/>
5. Define the PostBack () method in the background of the parent window.
Protected string PostBack ()
{
Return this. Page. getpostbackeventreference (this. hidadd, "getlist ");
}
Hidadd triggers the following events
Protected void btnadd_click (Object sender, eventargs E)
{
This. getlist ();
}