1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    ranjithkumar is on a distinguished road

      0  

    Default Unanswered: Basic Form Submission

    Unanswered: Basic Form Submission


    Hi, I am new to Sencha.
    I want to do a user login in Sencha Touch 2, JSP or PHP backend, and MySql database and I want it to submit as we normally submit the html or php page.
    But I cant navigate to the JSP handler page in which the database code is written, or I cant access the POST values of the Sencha form. I am posting the code I created here.
    Please help me, Thanks in advance

    Code:
    Ext.application({
        name: 'Sencha',
        launch: function() {
                    Ext.create('Ext.form.Panel', {
                    fullscreen: true,
                    standardSubmit: true,
                    title: 'Register',
                    items: [
                        {
                            xtype: 'textfield',
                            name : 'name',
                            label: 'User Name'
                        },
                        {
                            xtype: 'passwordfield',
                            name : 'password',
                            label: 'Password',
                        },
                        {
                            xtype: 'fieldset',
                            instructions: 'Please Enter the Details Above',
                        },
                        {
                            xtype: 'button',
                            text: 'Submit',
                            ui: 'confirm',
                            handler: function()
                            {
                                    simple.getForm().getEl().dom.action = 'addvisitorhand.php';
                                    simple.getForm().getEl().dom.method = 'POST';
                                    simple.getForm().submit();
                            }
                        },
                        
                    ]
                    
                });
        }
    });
    Last edited by skirtle; 28 Dec 2011 at 5:35 AM. Reason: Added CODE tags

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Answers
    102
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    I'm confused. Is addvisitorhand.php supposed to load the real sencha touch app?

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    ranjithkumar is on a distinguished road

      0  

    Default


    No, the frontend, ie the touch app is loading.
    But what I want is when I click on the Submit button I want to navigate to a page named "addvisitorhand.php" in which i had wriitten the backend code ie the code to check if the username and password entered by the user exist in the database and if it exist navigate to the user home page or else print an error message.