Apple Safari Browser window.open problem

Source: Internet
Author: User

Phenomenon: In the process of doing the project, using window.open to open a new window, testing on the Windows system's Ie,firefox,chrome browser is no problem, In the Apple System Safari browser found some window.open can open tabs, some can not open

The first option is to open the tab

The second type does not open the tab

Solution: Baidu found that "there is no way to execute window.open in the callback function in Safari because Safari security is blocking it", thesolution is to open a blank window before the request, In the request successful callback function: If the request error does not need to open the page, will open the blank window to turn off; otherwise modify the location address of the currently open blank window

Note: the Request_data.post_data () method is a self-styled request function, the Postdatasucfun function is the callback function after the request succeeds, error 0 is successful, the request is not 0, the request fails to close the new blank window

Apple Safari Browser window.open problem

Related Article

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.