Solutions to wbox IFRAME callback close Problems

Source: Internet
Author: User
For example, wbox is used in a page. IFRAME A page is displayed, which is used for user login. After Successful Logon, wbox is closed. In fact, the method of implementing callback to close wbox is very simple, that is, using the IFRAME Dom operation, for example, our Code Write as follows:

  // assign values to wbox, then use the close method of the wbox object to close    var  wbox  =$  ( " # iframe " ) .  wbox   ( { requesttype :   "iframe"  ,  Target : " B .html " } )  ; 

So we have performed user login verification in page B .html. We have verified the success and want to disable it.WboxYou can useParent. wbox. Close ()As shown in the following code, IFRAME can be closed after we verify that closewbox is run:

 
FunctionClosewbox(){Parent.Wbox.Close() 
}

AboutDomFor more information, seeArticle: Use JavaScript to perform IFRAME Dom operations in IE and Firefox

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.