• 1 reply
  • Latest Post - ‏2012-05-28T07:56:43Z by SystemAdmin
570 Posts

Pinned topic Worklight - Go back from a page

‏2012-05-26T13:52:06Z |
Hi all. I am developing a Multiple page sample application which follow the standards of Multiple Pages and Fragments in Worklight. The problem I face is, a page once loaded is not loaded again. For example, from the main page, I am moving first page to second page to third page. I have a back button, and when I click back, it has to go main page from third page, I cannot able to load the main page .

The device shows an Application Error saying, A network error occurred. (file:///mnt/sdcard/com.Sample.Test/www/default/mainpage.html)
I have tried using,

PAGE2.back = function(){
WL.Page.load("pages/mainpage.html", {
onComplete: function() { MAINSCREEN.init(); },
onUnload: function() { MAINSCREEN.unload(); }

Kindly help me to proceed.
  • SystemAdmin
    570 Posts

    Re: Worklight - Go back from a page

    Try to use the function WL.Page.back(), when you invoke it, you will be redirected on the previous page automatically