-1

I am trying to build a mobile web app using worklight .I checked the IBM website but they have limited documentation on it.I wanted to know is there any inbuilt API provided by IBM in order to develop the mobile web app?

I am specifically looking for API to to control the refresh button and the back button in mobile web browser

sumanth10
  • 34
  • 5

1 Answers1

2

Why limited? Where did you look? There is comprehensive user documentation and training modules in the following websites:

Regardless, there is no such thing as "controlling a browser's Back and Refresh buttons".
These buttons are provided by the mobile browser and are out of scope for whatever is running within.

It would be more beneficial for you to edit the question and explain your specific scenario - what it is that you are actually trying to accomplish.

In Worklight, you have WL.Client.reloadApp, for example, which can be used to refresh the web resources displayed. As for "back button"-like functionality, this can only be determined once you explain what you are trying to accomplish.

Additionally, keep in mind that while Worklight provides some API methods for controlling UI elements, it does so only to a certain degree and only for elements that are most common to all mobile environments (iOS, Android, ... for example, creating a tabbar); when you develop a web app for the Mobile Web environment, you cannot control via the app things like the Refresh button that the mobile browser supplies.

Lastly, you can and probably should opt to 3rd party frameworks such as jQuery Mobile and the like for the UI aspect in your Worklight application.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • Am building a form in which once the user submits the forms he shouldn go to the previous page.He should be directed to the page previous to the form page. – sumanth10 Jul 25 '14 at 13:01
  • Am trying to create a page where user is shown a a entirely new page on hitting submit page.But he shouldn be redirected to the submit page ,but rather to the page previous to that.And my application is the single page html page – sumanth10 Jul 25 '14 at 13:10
  • You can use jQuery or jQuery Mobile to divid your app into "screens" where each screen is a DIV and you simply load different divs based on your app needs. Review the jQuery/jQuery Mobile page navigation documentation in their website. – Idan Adar Jul 25 '14 at 13:47
  • Yeah we have done exactly the same thing,now issue is that i want the control the back button of the mobile.If a user presses on back button i shudn take him to previous page rather it should take him to the page defined by me. – sumanth10 Jul 28 '14 at 04:23
  • This looks like an interesting resource: http://www.codeproject.com/Questions/149637/Disable-Browser-Back-Button-functionality-after-cl – Idan Adar Jul 28 '14 at 04:25
  • Ok here the what happening.I am working on a banking app which has been built for all kind of mobile platform.As i said early am working on the mobile web app part of the banking application.The event of back button in mobile phone has been handled completely .So my job will be easier if i jst get to know whether the back button has been clicked in mobile browser.So tat once i come to know tat it has been clicked ill provide the function which is already been written for mobile app.This function has handled all kind of possibility – sumanth10 Jul 30 '14 at 06:29
  • Please google... here is one result: http://stackoverflow.com/questions/2008806/how-to-detect-if-the-user-clicked-the-back-button – Idan Adar Jul 30 '14 at 06:31
  • @sumanth10, If my answer helped you solve this issue, please mark as answered. – Idan Adar Nov 01 '14 at 11:15