JS Popup page Refresh parent page

Source: Internet
Author: User

//Click Add to the main page to jump to the Jcxmupdate pagefunctionaddnewdata () {//Center Display                varURL = "jcxmupdate.aspx?action=" +actionmethod; varHeight = 280; varwidth = 600; varWin = Openwin (Url, height, width, "no")); Win.focus (); //make the popup page get focus                return false;//prevent page Refresh                      }//Popup PagefunctionOpenwin (Url, height, Width) {vartop = (SCREEN.AVAILHEIGHT-HEIGHT)/2; varleft = (SCREEN.AVAILWIDTH-WIDTH)/2; vartitle = Url.split ('. aspx ') [0].replace (".:", "")); if(title.indexof ('/')! =-1) {        varBegin = Title.lastindexof ('/'); Stitle= Title.substr (begin + 1, title.length-begin);//file nametitle =stitle; }    varWin = window.open (Url, title, ' height= ' + height + ', width= ' + width + ', top= ' + top + ', left= ' + left + ', toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, Status=no '); returnWin//make the popup page get focus    //return false;//prevent page Refresh}

//===========================================//sub-page CloseWindow.onbeforeunload =function () {                if(window.opener! =NULL) {                    //Window.opener.AddRefresh ();Closewin (); }            } functionClosewin () {hasclosed=true; Window.opener.location= "javascript:addrefresh ();";//parameters "javascript:addrefresh (" +1+ ");";Window.opener =NULL; Window.close ();
} //Main Page Refresh//refreshfunctionAddrefresh ()//Addrefresh (id) with parameters to parent page pass parameters{ //Alert (id);//document.getElementById ("ctl00_pagebody_button2"). Click ();Document.form1.submit ();}
// the child window gets the value of the parent window var text= window.opener.document.getElementById ("TextBox1"). value;
Alert (text);

JS Popup page Refresh parent page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.