facebook

urgent:javascript and mailto issues

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

    Kifo
    Member

    Hi,
    1) i have set my form to submit its values to a mail application using url: mailto method. It is working perfectly in iOS but its not working in android ?!!

    2) how to set field’s value using javascript? for example i want my textfield to take the values in combobox1 + combobox2 + combobox3

    3) how to submit only one field’s value from one form to another? for example i want to set the date in a form and send the result to another form without changing the other form’s method.

    #327368 Reply

    support-michael
    Keymaster

    @Kifo

    >1) i have set my form to submit its values to a mail application using url: mailto method. It is working perfectly in iOS but its not working in android ?!!

    Are you creating an android app or webapp? And what version of android are you running?

    Also know that mailto: is not going to give you consistent results across platforms. Even on iOS if you run a webapp app it behaves differently when launch from URL vs when saved to homescreen and launched. The latter will leave your app stuck in the iOS mail client (that is how iOS works).

    >2) how to set field’s value using javascript? for example i want my textfield to take the values in combobox1 + combobox2 + combobox3

    You will need to manage this UI with a bit of javascript. See the following docs for background and javascript snippets.
    Interacting with Widgets: JavaScript Snippets
    Working with Generated Application Files

    >3) how to submit only one field’s value from one form to another? for example i want to set the date in a form and send the result to another form without changing the other form’s method.

    I’m sure I fully get #3. My post a couple of screenshots of your forms or something like that to get me up to speed. Here is an example I just posted for cross screen updates that may be helpful: http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=3136

    #327374 Reply

    Kifo
    Member

    Hi,

    Thank you so much for the information in 2 & 3 … the example and the web links are informative and i will try them.

    regarding #1, my application is a webapp currently, i will generate iOS and android ones after fixing the webapp one. I have tested on android 2.1 … if mailto wouldn’t work in all how could i email my data? what other solution you suggest?

    #327413 Reply

    Kifo
    Member

    okay, javascript is working now but i have one question,
    4) how to change combobox values dynamically? and how to set values on load? ex: day, month, year for current date

    #327429 Reply

    support-michael
    Keymaster

    @Kifo

    Let’s use the combo example provided here
    http://genuitec.com/mobile/docs/javaScriptSnippets/javaScriptSnippets.html#combobox_widget_snippets

    Here are some snippets:

    
    //remove all options from a combo
    $('select[name="combobox1"]').html("")
    
    //assign all new options to a combo
    $('select[name="combobox1"]').html( 
       "<option value='1'>item 1</option>
        <option value='2'>item 2</option>
        <option value='3'>item 3</option>"
    );
    
    //add an option to the beginning of combo
    $('select[name="combobox1"]').preappend( $("<option value='1'>Item 1</option>") );
    
    //add an option to the end of combo
    $('select[name="combobox1"]').append( $("<option value='1'>Item 1</option>") );
    
    
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: urgent:javascript and mailto issues

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