functionOpenpostwindow (url,data,name) {//URL to jump to the page, the data to be passed, the name of the new form name varTempform = document.createelement ("form"); Tempform.id= "TempForm1"; Tempform.method= "POST"; Tempform.action=URL; Tempform.target=name; varHideinput = document.createelement ("Input"); Hideinput.type= "hidden"; Hideinput.name= "Dataname"Hideinput.value=data; Tempform.appendchild (Hideinput); Tempform.attachevent ("OnSubmit",function() {Openwindow (name);});//The URL must not be used with name, otherwise it cannot be passed to a new pageDocument.body.appendChild (tempform); Tempform.fireevent ("OnSubmit"); Tempform.submit (); Document.body.removeChild (tempform);}functionOpenwindow (name) {variwidth=1100;//the width of the popup window; variheight=550;//the height of the popup window; varITop = (window.screen.availheight-30-iheight)/2; Get the vertical position of the window;varILeft = (window.screen.availwidth-10-iwidth)/2; Get the horizontal position of the window; window.open (' About:blank ', name, "height=" +iheight+ ", width=" +iwidth+ ", top=" +itop+ ", left=" +ileft+ ", Toolbar=no, Menubar=no, Scrollbars=yes,resizable=yes,location=no, Status=no "); }
In the new page: String data = (string) request.getparameter ("Dataname"); Gets the value passed in on the previous page
Window.Open open a new form and use the Post method to pass the parameter