facebook

Submit Form problem

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #348912 Reply

    pentad
    Member

    I have 2 .mobi screens.
    Screen 1 is welcome message with Button inviting logon. Button click simply Goes to Screen 2

    Screen 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?
    Thanks

    #348950

    Code_A
    Member

    I 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?

    #348952

    Hi 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

    #349027

    pentad
    Member

    Hi
    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.

    #349028

    Code_A
    Member

    The 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.

    #349032

    pentad
    Member

    Thanks for that friend , on the road right now, will try later (closing quote was a typo!) will try val function

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Submit Form problem

You must be logged in to post in the forum log in