Software Archive
Read-only legacy content
17061 Discussions

Load a certain panel only at the first start-up of the application

Kancho_K_1
Beginner
519 Views

Hi guys,

I am trying to show a certain panel or panels only when the mobile app is downloaded and started for first time, so that every next time when the user enters the application this panel or panels would not come up anymore.

My panels are built as div elements into one HTML file (index.html). Into the init-ap.js file I set a flag into the localStorage that holds a value showing if the app is started for first time or not. Then into the HTML file I added a script section where into the document.ready event I check that flag and according to its value I am showing or hiding the respective panel(s). The problem is that this is working fine into the emulator, but not on a real device.

I show a panel by setting the selected attribute to True: $("#panel1").attr("selected", "true");

To hide a panel I just remove that attribute: $("#panel1").removeAttr("selected");

I decided to post this topic here as I guess that somebody might have done this before and offer some tips and tricks.

Thanks a lot in advance!

0 Kudos
0 Replies
Reply