-
28 Dec 2011 3:32 AM #1
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
-
28 Dec 2011 6:15 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
- Answers
- 83
I'm confused. Is addvisitorhand.php supposed to load the real sencha touch app?

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
28 Dec 2011 9:30 AM #3
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.


Reply With Quote