This article I have written before, is to click on a new window to do operations in a new window, and then the value of the use of JS Parent.iframe.formname.inputname.value so that the reality of the new page values. Here we summarize a few common methods.
Method One,
Main Page Open new Window JS event:
function Showmodelwindow () {
var itop = (window.screen.height-600)/2;
var ileft = (window.screen.width-500)/2;
var Reval = window.showmodaldialog (' basictype.asp tutorial x ',
' dialogheight:300px; Dialogwidth:100px;dialogtop: ' + itop + '; Dialogleft: ' + ILeft + '; edge:raised; Center:yes; Help:yes; Resizable:no; Status:yes;scroll:no; ');
if (typeof (Reval)!= ' undefined ') {form1.txtscd_type.value = Reval;} Take back the transfer value
}
New open Window OK button:
function Confirmback () {
Window.returnvalue = "value to return";
Window.close ();
}
Method Two,
Main Page Open new Window JS event:
function Showmodelwindow () {
var itop = (window.screen.availheight-510)/2; Gets the vertical position of the window;
var ileft = (window.screen.availwidth-650)/2; Get the horizontal position of the window;
window.open (' gethscodeinfo.aspx ', ', ' height=510px, width=650px, top= ' + Itop + ', left= ' + ILeft + ', toolbar=no,menubar= No, Scrollbars=yes, Resizable=no,location=no, Status=no ')
}
New open Window OK button:
function Confirmback (A, B, c) {
Window.opener.document.getelementbyid ("Txtcategory"). Value = A;
Window.opener.document.getelementbyid ("Txths_code"). Value = b;
Window.close ();
}