For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 5 replies, 3 voices, and was last updated 12 years, 3 months ago by
pentad.
-
AuthorPosts
-
pentadMemberI have 2 .mobi screens.
Screen 1 is welcome message with Button inviting logon. Button click simply Goes to Screen 2Screen 2 has 2 fields; username and password, and a Logon Button (Action Submit Form). Form action is get, Data(AJAX-XML) and URL is remote. (doesn’t matter how, see next)
If I run Screen2 alone, and logon, app connects and returns expected response.
However, If I run Screen 1 and then Go to Screen 2 clicking button, Get to Screen 2, click logon and nothing happen.
I put an alert into custom.js , pre-submit function for Screen 2; but it never gets fired.
Have I missed something? or is it a bug?
ThanksApril 22, 2014 at 4:04 pm #348950
Code_AMemberI do not see any reason why you shouldn’t get the same result either way you access the screen. Are you able to share your project files, or a sample project that illustrates this issue?
April 22, 2014 at 4:40 pm #348952
support-octavioMemberHi pentad,
I think the problem is that you are expecting the custom code of second screen is fired when form of screen 2 is submit. This won’t happen as code from _custom.js related to secondary screens are not added to main_custom.js file of main screen. See a more detailed explanation here: http://www.genuitec.com/support-genuitec/viewtopic.php?p=6485#p6485
April 25, 2014 at 2:48 pm #349027
pentadMemberHi
I know NOW that whatever I may think is logical isn’t necessarily so. I spend much time adding code the custom_js of the target screen ( I thought it logical to develope the bits then join them together!), only to find that IF there is a start-up screen, and the GOTOscreen is implemented grammatically, all that code is not fired! it has to be in the startup-custom_js (with unique function names of course) , ok, that’s the way it is.That aside with this knowledge:
I now have a startup- screen, and I want to GOT a target screen with a text widget on it called message, i want to populate that field when/after I get there:
outline code:
$(‘#m1-ReverieSearch-message’).text(“got here);
phoneui.gotoScreen(‘#m1-ReverieSearch’, ‘FADE’)
The gotoScreen Works, but the message field is not updated. (tried setting message before and after the GOTO)
I apologise for not understanding the inter-screen communications, but once I understand the mechanism I will be fine. can you help please.
April 25, 2014 at 3:22 pm #349028
Code_AMemberThe way you are doing it should work. If that is your exact code that you are using in your app, then add closing quotations to the “got here” message and try it again.
EDIT:
And if you are using a textfield, try assigning the text to the .val() property instead.April 25, 2014 at 5:54 pm #349032
pentadMemberThanks for that friend , on the road right now, will try later (closing quote was a typo!) will try val function
-
AuthorPosts
