简体   繁体   中英

How to open another page in HTML5 Builder Server Mobile Application

We are still rookie developers in HTML5 Builder, creating a Server Mobile Application.

We would like to know how to open another page (page2.php) using javascript.

Basically, the user will fill in a form, when the 'Submit' button is clicked, a few basic checks are done in javascript (like to check if all fields are filled in) and if validation is successful, the app needs to load the next page.

The following code have been tried:

window.location = "page2.php";

window.open('page2.php','_parent');

Both of these work fine when the app is running in a browser on the pc, but it does not work on the deployed app on Android, which will be the end product. We also tested it on more than one device with different versions of Android, with same result.

Any help will be appreciated, thank you.

如果您使用的是客户端AJAX导航(默认情况下在移动页面中启用),则可以使用以下方法更改页面:

$.mobile.changePage("TargetPage.php");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM