×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    9

    Submit and Command Buttons

    Hi,

    Do web apps on Nokia browser for S40 implement Submit and other Command Buttons.
    I need to have a form submitted to a servlet, and a display to change when a user clicks a
    command button.

    Regards

  2. #2
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Submit and Command Buttons

    Hi,

    Submitting a form should work. Please let me know if you face any problems.

    Br,
    Ilkka

  3. #3
    Registered User
    Join Date
    Apr 2012
    Posts
    1

    Re: Submit and Command Buttons

    Thanks for this post. It sure helps a lot..

  4. #4
    Registered User
    Join Date
    Sep 2011
    Posts
    9

    Re: Submit and Command Buttons

    When I use the simulator in the development environment I am able to submit a form and the other command buttons work.
    Also, when i view index.html in a firefox browser, the buttons work. However, once I have loaded my app into a Nokia C3 phone I can
    enter text into text boxes but the submit and other buttons do not respond to clicks.

  5. #5
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Submit and Command Buttons

    Hi,

    Could you share the form part of you app to demonstrate what buttons & inputs you are using?

    Br,
    Ilkka

  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    9

    Re: Submit and Command Buttons

    Hi,

    Kindly, find the form part below. It uses jQuery where src="jquery.js".

    <form name="form1" onsubmit="return OnSubmitForm()" method="get">
    <div id="bookmarks_data" style="display: block">
    <div class="sdivContainer2" >
    <table class="tblHeader2" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td class="tdHeader" width="">Mahogany
    </td>

    </tr>
    <tr class="strDlg">
    <td class="stdDlg" width="">
    <input class="sbtnDlg" id="sbtnSubmit" type="submit" value="Submit";"
    title="Sends data to Servlet."/><input class="sbtnDlg" id="sbtnRemoveAll" type="button" value="Reset" onclick="RemoveAll();"
    title="Displays the data capture screen"/>
    </td>
    </tr>
    <tr class="strDlg">
    <td class="stdDlg" width="">Username &nbsp
    <input class="stxfDlg" name="username" id="stxfUsername" type="text" value="root" style="width:100px"
    title="Enter your username." />
    </td>
    </tr>
    <tr class="strDlg">
    <td class="stdDlg" width="">Password &nbsp
    <input class="spwfDlg" id="spwfPassword" name="password" type="password" value="root" style="width:100px"
    title="Enter the password."/>
    </td>
    </tr>
    <tr class="strDlg">
    <td class="stdDlg" width="">URL: <br />
    <textarea class="stxaDlg" id="stxfURL" style="width:200px"
    style="height:50px" title="URL of the Servlet Server.">http://localhost:8080/jjolt/servlet/SimpleReturn</textarea>
    </td>
    </tr>
    <tr class="strDlg">
    <td class="stdDlg" width="">Location?
    <input class="chkDlg" type="checkbox" value="chkLocation" />
    </td>
    </tr>

    </table>
    </div>
    <div id="stxfReply" class="sdivContainer2"
    style="position:relative; height:30px; overflow:auto;">
    </div>
    <div class="main">
    <table class="keyvalue stlbDlg" border="0" cellpadding="0" cellspacing="0" width="100%">

    </table>
    </div>
    <div>
    <textarea class="textArea1" rows="3" cols="20"></textarea>
    </div>

    <input class="sbtnDlg" type="button" value="Add line" onclick="javascript:AddLine()" />
    <input class="sbtnDlg" type="button" value="List All" onclick="javascript:ListAll()" />
    <input class="sbtnDlg" type="button" value="Remove" onclick="javascript:RemoveLast()" />

    </div>
    <input type="text" id="coords0" name="count" style="visibility: hidden;"/>
    <input type="text" id="coordinates" name="coordinates" style="visibility: hidden;"/>
    </form>

    Regards,
    Rugongo

  7. #7
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Submit and Command Buttons

    Hi,

    Sorry for the late reply. I checked your code and indeed there is a problem on how onsubmit handler is handled on platform side. When submit is cancelled, the web app changes from web app context to web page context.

    As a workaround I would recommend to get input values using JavaScript and use XMLHttpRequest to send data to server.

    Br,
    Ilkka

Similar Threads

  1. removing command buttons
    By success_anil in forum Symbian
    Replies: 1
    Last Post: 2009-08-28, 12:30
  2. Cannot see command on two buttons in Nokia 6230
    By panki15 in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 1
    Last Post: 2006-10-06, 20:11
  3. command buttons?
    By peter_k_john in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2005-11-14, 12:26
  4. Menu's using Command Buttons
    By bmcnicoll in forum Symbian
    Replies: 1
    Last Post: 2003-09-29, 19:40
  5. Command Buttons
    By GENERAL_INFO in forum Symbian User Interface
    Replies: 1
    Last Post: 2001-12-05, 20:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •