facebook

Simple Login Form – Please help

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

    luciogodoy
    Member

    Hi Guys;

    Thank you for an excellent package, very easy to use.

    I am trying to create a very simple login form with 3 fields: username, password and a submit buttom.

    This is how i have done it:

    create a basic app, in the main properties select the Form option, the the Form Action: https:wwwxxx.com/iphone/teste.php methot: Post.

    and then add the Username, password and submit buttom, and on the submit buttom set Form Action: Submit

    I have got the teste.php in the server, (i know it is working) but i cannot get anything from it?

    I click submit and the login pages sits in there doing nothing, i can see the app requesting from the server (apache logs) but nothing happens!

    What am I doing wrong please?

    Thanks

    LG

    sample code:

    <!DOCTYPE HTML>

    <html>
    <head>
    <title></title>
    <meta name=”generator” content=
    “MobiOne Studio – Design Center, http://genuitec.com/mobile“>
    <meta name=”viewport” content=
    “width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;”>
    <meta http-equiv=”Content-Type” content=
    “text/html; charset=UTF-8″>
    <meta name=”apple-mobile-web-app-capable” content=”yes”>
    <link type=”text/css” rel=”stylesheet” href=”index.css”>
    <script type=”text/javascript” src=”res/jquery-1.3.2.min.js”>
    </script>
    <script type=”text/javascript” src=”res/preloadCssImages.js”>
    </script>
    <script type=”text/javascript” src=”index.js”>
    </script>
    <script type=”text/javascript” src=”index_custom.js”>
    </script>
    </head>

    <body onload=”hideAddressBar()”>
    <div id=”root”>
    <form action=”https://www.xxxx.com/iphone/teste.php&#8221; name=”index” method=”get” class=”form” >
    <!–********** index.mobi design **********–>

    <div id=”index” class=”m1-root”>
    <button id=”index-push1″ class=
    “submit”
    type=”button” onclick=”submitForm(form, this, null)”
    name=”push1″>sub</button>
    </div>
    </form>

    <div id=”loading-div” class=”m1-loading”>
    </div>

    <div id=”homescreen-prompt” class=”m1-homescreen-prompt”>
    <img src=”res/images/icon.png”>

    <div>
    Click on + to add this page to your homescreen
    </div>
    </div>
    </div>
    </body>
    </html>

    #310909 Reply

    wayne
    Moderator

    Not sure what could be happening here. To confirm you stated that you observe the server being queried with a login request from the mobione client, either Test Center emulator, iphone or your desktop browser, right? What browser are you using to test with, e.g., Test Center?

    Assuming yes, here are few things to try:

    1) disable the “Offline Support” property on your form design file. Also if you are testing with the Test Center, goto it’s cache settings and clear everything. Then rerun your design or reexport the design and test. Some background for this is that offline support uses an HTML5 appcache manifest file that must include the form’s action URL to function properly. By default MobiOne generates the manifest to include all form action URLs. But if you manually change the form URL and do not update the manifest then your form processing might goof up.

    2) if #1 is a nogo, then try setting an alert or two in the javascript’s execution to see how far execution is progressing before failure. Begin with an alert in the <form>PostSubmit() function to see if it is being executed, e.g., alert(“at postsubmit”);

    Let me know what you find out. I’m hoping to get a could of form examples online in the next week.

    Wayne
    Genuitec Mobile Team

    #310946 Reply

    luciogodoy
    Member

    Hi Wayne;

    Thank you for your reply.

    I cannot figure out whats wrong, it is so frustating.

    I have run the apps and then copied the whole dir, and it includes a teste.php file that i am using to test the app.

    Many thanks

    LG

    Attachments:
    You must be logged in to view attached files.
    #312609 Reply

    Albatros78
    Participant

    Hello Wayne, all

    I try again to use the form action with a very light page and mb1 Beta 1.

    On my page I have just only a field for login text and a ‘valid’ button.

    In the properties of my form I have:
    Form: checked
    Form Method: POST
    Form Action URL: results2.mobi
    Form result: Web Page

    When I Click on my ‘valid’ button to go to results2 page nothing is done.

    It’s normal because into my generated html code I have none information regarding the action for my form.

    My Html code is there.
    <!– ***** login2 ***** –>
    <div id=”m1-login2″ class=”m1-root”>
    <form resulttype=”WEB_PAGE” name=”m1_login2″ method=”POST”>
    <div id=”m1-login2-push1″
    class=”m1-push-button m1-font-Helvetica-1 m1-shadow-1 m1-hyperlink m1-button” name=
    “push1″ href=”javascript:check_login()”>OK</div>
    <input id=”m1-login2-textField1″
    class=”m1-font-Helvetica-2 m1-textfield m1-textfield-custom” value=”” type=”text” name=
    “textField1″/>
    <div id=”m1-login2-text1″ class=”m1-font-Helvetica-3 m1-shadow-2 m1-text”>Login Name</div>
    </form>
    </div>
    </div>

    Are you sure that form submit is ok int this Beta 1 ??? Bug already open ?

    Thanks for your help

    #312813 Reply

    Albatros78
    Participant

    ^Wayne, All

    It woulrd be very nice to have any workaround to this issue.

    How to got to the next page if the first one is clerad as ‘form’… No action is declared into form html code ?
    How to retrieve the field variable in the second page, from the POST html event into the 1st page

    Maybe misunderstanding from my side

    Mb1 team pls, docs, howto, code samples, tech tips will be welcome 🙂

    Thanks

    #313300 Reply

    Albatros78
    Participant

    Hi Wayne,
    Hi guys

    I go back with this issue which is not ready for me even with 1.0.1 mb1

    Here my simple sample

    Page 1 with one button to go to page 2
    Page 1 is defined with af Form, POST method, Link to the page 2
    the button is defined with submit
    Not control, and no anything more into the code

    When I Click on the button the action of the form is not excuted (link to next page 2). Why ???
    Link “Action=…” is not written into html file into the form tag !!! is it the issue ????

    Explanation, fix, errors ?

    My sample is uploaded there.

    Many thanks for your help. If I could have some help more efficient. my last post was October 2th !!!

    Attachments:
    You must be logged in to view attached files.
    #313315 Reply

    support-michael
    Keymaster

    Alex,

    I posted a short HOW-TO for creating a login form linked to a results page.
    http://www.genuitec.com/support-mobione/viewtopic.php?f=14&t=1147

    Your login example had 2 bugs, 1 was your’s and the other was a MobiOne phoneui.js bug. The MobiOne 1.0.2 release will include a fix for the bug. I discovered that relative URLs, e.g., page2.html as a link property are being ignored.

    I also looked at your graph example and it suffered from the same issue as your login example. I posted an updated version based on guidance from your example: http://genuitec.com/mobile/mobione/1.0/examples/axels-graph/graph.html
    I also sent you the zip of the design and code by email.

    Lastly, I apologize for the delay in addressing your issues.

    Wayne
    Genuitec Mobile Team

    #313318 Reply

    Albatros78
    Participant

    Wayne,

    Thanks for your quick replies

    For 1st issue, you said that I had one error into my design. Which one ?
    Need to know to avoid to do it again !

    And for the graph also. Which error into my design. Need to undertsand 🙂

    In any case, thanks…. For infos graphics are not really from me, but from FusionChart. A very attractive solution. Just used with mb1.

    No file received yet into my email about graphs

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Simple Login Form – Please help

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