Just wanted to share something very basic about S40 webapp development that I learnt recently, and would have saved me a lot of time had this fact been made very clear in the documentation pdfs available.

If you are intending to have multiple scenes / views / pages for your webapp, creating separate html pages and loading them using mwl.loadURL() is _not_ the way to go about it. The widget modeled web app architecture does not allow for this (as far as I know - I encountered some major rendering issues with the pages other than index.html).

So how does one add multiple views/pages? Well, you put all the html content for each view in its own container (div mostly), and then hide or make it visible as and when necessary. Basically, there will only be one html file, and that is the index.html file, and the javascript file will handle events based on which it decides which container nodes to show and which ones to hide to create a different view.

I have found that simply adding a couple of classes like the ones below and applying them to the divs you want to show/hide help with this task immensely:

.hidden {
display: none;

.visible {
display: block;

Just hiding a container node (eg. div) instead of removing that node allows for faster access of the div's content in the future (if done during the same browsing session) without having to re-request the content and rendering methods from the server-side.