facebook

clear e-mail text boxes using button

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

    Hi Support,

    I have created a Clear button on my e-mail screen to clear all text boxes(nameField, emailField, messageArea). I have the following java script but it does not work.

    I tried these scripts for the nameField but not working:

    m1-myEmailScreen-nameField = “”;
    nameField = “”;
    m1-myEmailScreen-nameField = ‘ ‘;
    nameField = ‘ ‘;

    What is the correct way to do this?

    Please help. thanks.

    #338111 Reply

    Rob,

    Please take a look at next doc to learn the snippets to get/set the values of your textboxes:
    http://www.genuitec.com/mobile/docs/widgetReference/widgetReference.html#select_and_input_properties

    #338112 Reply

    nvts
    Member

    Hello,

    Here is a function to attach to a button to clear

    function clearEntry() {

    $(‘#m1-myEmailScreen-nameField1’).val (”);
    $(‘#m1-myEmailScreen-nameField2’).val (”);
    $(‘#m1-myEmailScreen-nameField3’).val (”);

    }

    Change the screen name and the fields to match your mobi app.

    Cheers…

    #338121 Reply

    Got it!!! It works!!!

    Thanks Guys.

    #338126 Reply

    Brandon
    Member

    If you have your screen set to a form I believe using a button with the reset form should work…?

    Or just use: $(‘#m1-myEmailScreen input’).val(”);

    to clear them all at once. If you add more you wont have to change the code too.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: clear e-mail text boxes using button

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