Hello,
the instruction phoneui.gotoPage is a real mess and a headache !! When I assign it to a button in the event OnClick it works some times, some times it doesn´t and sometimes when it works then it doesn´t work.
I have 3 buttons on a toolbar. To button1 I assigned
phoneui.gotoPage('m1-page1', 'DEFAULT');
and to button2 I assigned
phoneui.gotoPage('m1-page2', 'DEFAULT');
Unfortunately this worked rarely. After testing a lot I discovered first that it is case-sensitive. It is not the same page2.mobi than Page2.mobi when calling the page.
In the 3rd. button I assigned Go to Screen in the event OnClick for page3.mobi and reading the JS file, I found that the system generates this code:
'action5':function() { phoneui.gotoPage('m1-page3', 'DEFAULT');
This is Ok and it was so for the other 2 buttons.
Now that I check the code again (because the damned code is not working as it did before) I see that the system generated these lines of code:
action3':function() { var ex; try { eval('phoneui.gotoPage(\'m1-page1\', \'DEFAULT\');'); } catch (ex) { console.log(ex); };
; },
'action4':function() { var ex; try { eval('phoneui.gotoPage(\'m1-page2\', \'SLIDE_UP\');'); } catch (ex) { console.log(ex); };
; },
So, what is the reason for this automatic change in code and why is it not working any more ?? I deleted the buttons, created new ones, assigned the JS code again and it still does not work.