You can load online and offline page content in Mobile JS framework. The following methods help you achieve this.
For Offline Content:
You can load the offline page content in two ways, that is by using with Ajax call or without Ajax call, that is explained as follows.
Option 1: With Ajax Call
To load the offline content with Ajax call, you have to set the page url as the second parameter of the App.pageTransfer method as shown in the following code example. Here it’s given as ajax.html for JS and /home/ajax for MVC.
Option 2: Without Ajax Call
To load the offline content without Ajax call, you can set the page url as href in the anchor link tag and set data-ej-appajax attribute as False. Here it is given as navpage.html for JS and /home/navpage for MVC. Refer to the following code example.
Note: When you are doing this, you cannot achieve transition effect while transferring from one page to another, since the transition effect is applicable only for Ajax content loading.
For online content:
You cannot load the online page content by using the transferPage API, because it is completely handled with AJAX. However, you can achieve this by disabling the ajax feature with the anchor link while using the MobileJS source files.
To load the online content without Ajax call, you can set the page url as href in the anchor link tag and set the data-ej-appajax attribute as False. Here it is given as http://www.google.com. Refer to the following code example.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|