Dim strScript As String = "<Script Language = 'vbscript'>" & vbCrLf
StrScript & = "opener.parent.doc ument. location. href =" "&".../Individual/UserJobs. aspx? EntityTableID = "& Request (" EntityTableID ") &" & ListID = "& BLL. tableType. entity & "& OrgID =" & Request ("OrgID") & "& TableID =" & oRightGroupAccessTableView. templateTable. tableID & IIf (Request ("RecordID") Is Nothing, "", "& RecordID =" & Request ("RecordID") & "" & vbCrLf
StrScript & = "</Script>" & vbCrLf
Response. Write (strScript)
// Close. The parent window dialog box is displayed, and the Child window is closed directly.
This. Response. Write ("<script language = javascript> window. close (); </script> ");
// Close. The parent window and Child Window are not displayed. Close them directly.
This. Response. Write ("<script> ");
This. Response. Write ("{top. opener = null; top. close ();}");
This. Response. Write ("</script> ");
// In the pop-up window, refresh the current page width = 200 height = 200 menu. Menu Bar, tool bar, address bar, and status bar none
This. response. write ("<script language = javascript> window. open ('rows. aspx ', 'newwindow', 'width = 200, height = 200') </script> ");
// Refresh the current page in the pop-up window
This. Response. Write ("<script language = javascript> window. open ('rows. aspx ') </script> ");
This. Response. Write ("<script> window. open ('webform2. aspx ',' _ blank '); </script> ");
// In the pop-up window, jump to the webform2.aspx page (in an IE window)
This. response. write ("<script language = javascript> alert ('registered successfully'); window. window. location. href = 'webform2. aspx '; </script> ");
// Close the current Child Window and refresh the parent window
This. Response. Write ("<script> window. opener. location. href = window. opener. location. href; window. close (); </script> ");
This. Response. Write ("<script> zookeeper opener.location.replace(w.w.opener.doc ument. referrer); window. close (); </script> ");
// Refresh the parent window in the Child Window
This. Response. Write ("<script> window. opener. location. href = window. opener. location. href; </script> ");
This. Response. Write ("<script> window. opener. location. href = 'webform1. aspx '; </script> ");
// A prompt window is displayed. After confirmation, A subwindow (WebForm2.aspx) is displayed)
This. Response. Write ("<script language = 'javascript '> alert (' published successfully! '); Window. open ('webform2. aspx') </script> ");
// A prompt window is displayed. After confirmation, refresh the parent window.
This. Response. Write ("<script> alert ('published successfully! '); Window. opener. location. href = window. opener. location. href; </script> ");
// The Same page is displayed.
<INPUT type = "button" value = "Button">
//
Response. Write ("parent. mainFrameBottom. location. href = 'yourwebform. aspx? Temp = "+ str + "';");
<Script language = "javascript">
<! --
Window. open ('page.html ', 'newwindow', 'height = 100, width = 400, top = 0, left = 0, toolbar = no, menubar = no, scrollbars = no, resizable = no, location = n o, status = no') // write a line
-->
</SCRIPT>
Parameter description:
<Script language = "javascript"> the js SCRIPT starts;
Window. open command to pop up a new window;
'Page.html 'name of the pop-up window;
'Newwindow' indicates the name of the pop-up window (not the file name). It is optional and can be replaced by null;
Height = 100 window height;
Width = 400 window width;
Top = the pixel value between the 0 window and the top of the screen;
Left = 0 the pixel value between the window and the left of the screen;
Toolbar = no indicates whether to display the toolbar. yes indicates display;
Menubar and scrollbars indicate the menu bar and scroll bar.
Resizable = no: whether to change the window size. yes: yes;
Location = no indicates whether the address bar is displayed. yes indicates yes;
Status = no whether to display the information in the status bar (usually the file has been opened), yes is allowed;
</SCRIPT> end of js SCRIPT
'Newwin': hides the toolbar in the menu bar's address bar.
Width = 50: width
Height = 50: height
Scrollbars = yes/no: scroll bar
Top = 50: the window is above the screen
Left = 50: the window is located at the left of the screen.
Example: window. open ('detail. aspx? ID = "+ e. item. cells [1]. text + "', 'newwin', 'width = 750, height = 600, scrollbars = yes, top = 50, left = 50 ');");
This. response. write ("<Script> window. open ('webform2. aspx ', '', 'toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = no, resizable = yes, width = 750, height = 470, left = 80, top = 40'); </script> ");
Example:
This. Response. Write ("<script> alert ('published successfully! '); Window. opener. location. href = window. opener. location. href; </script> ");
This. Response. Write ("<script> ");
This. Response. Write ("{top. opener = null; top. close ();}");
This. Response. Write ("</script> ");
Example: linkcolumn1.DataNavigateUrlFormatString = "javascript: varwin = window. open ('edit _ usr. aspx? Actid = {0} ', 'newwin', 'width = 750, height = 600, scrollbars = yes, top = 50, left = 50'); window. close ()";
Mainframe. Attributes. Add ("src", TreeView1.SelectedValue. ToString ());