Web App page Close Child page local Refresh parent page (layer generation sub-page)

Source: Internet
Author: User

Main side: main.html main.js
Sub-page: page.html page.js

When a sub-page needs to be partially refreshed when the master face is closed,
You can now main.html define a hidden<input type= "hidden" id= "refreshbtn" onclick= "freshpage ()"/><!--for child window Refresh current page --
Add in Main.js:
/**
* Refresh the current page
      */
function Freshpage () {
F_open_url ('.. /partycs/tradepartymylist.html?&random= ' +math.random ());
    }
Customizing a close button in page.html<input id= "Reback" onclick= "Back ()" type= "button" value= "Off"/>
Add in Page.js:
function Back () {
window.parent.document.getElementById (' refreshbtn '). Click ();
var index = parent.layer.getFrameIndex (window.name);
parent.layer.close (index);
    }
and deactivate other ways to close the sub-page

Report:
If the sub-page is generated by the layer plug-in,
$.layer ({
Type:2,
title: ' New member ',
Maxmin:true,
Shadeclose:false,//Turn on Click Mask to close Layer
Area : [' 1200px ', ' 2000px '],
offset: [' 100px ', '],
Move:false,
closebtn: [1, false],
end:function () {
            },
iframe: {src: '.. /partycs/tradepartyadd '}
        });
The place to be modified isShadecloseproperty is False,closebtnis false;

Web App page Close Child page local Refresh parent page (layer generation sub-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.