The problem of nesting H5 pages in iOS has been blank

Source: Internet
Author: User
Tags blank page
Problem description

The following business scenarios, in iOS applications, embed the H5 page, call him a page, click a page to jump to b page, b page has a button, call him button S, button s will trigger an AJAX event, to request an application interface, return an HTML, the return of HTML is defined as h variable name bar, Ajax invocation ("Body"). html (h); H is the content of a form, which is set ("Body"). html (h); H is the content of a form, after setting ("Body"). HTML (h), The Submit method of the form in H is invoked, assuming that the ID of the form in H is Fid,js execution $ ("#fid"). Submit (), and then jump to the action address specified by form, OK, so now, on iOS devices, I clicked, The return button for the native app, not the Back button for the page (there are two back buttons on the screen), then there will be a blank page in iOS, not in the Android device. 

Problem Lookup

Later looking for iOS development, all kinds of look, can not find the reason, is brutal, a development sister later looked at the code, explained: In the call ("Body"). HTML (h), will empty the entire page, the page will have a blank period, wait until the Ajax return data, then set into the HTML , the HTML already jumps to the new page requested in form and clicks on the Back button of the iOS native view to see

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.