javascript - Uncaught TypeError: Object [object Object] has no method 'submit' error in sencha touch 2.1 -


There is a problem submitting this form to me when I click the submit button, it shows the unblocked type : There is no way 'submit' error in object [object object]

  submitcontactform: function () {var form = this.getLoginform (); Form.submit ({url: 'contact.php'}); }   

Thanks in advance

Edit:

My login.js

  Ext.define ( Extension: 'extension', xtype: 'LoginPanel', id: 'loginform', config: {title: 'LoginForm', item: [{xtype: 'emailfield', name: 'email' Label: 'email'}, {xtype: 'passwordfield', name: 'password', label: 'password'}, {xtype: 'button', text: 'submit', UI: 'confirmation', action: ' submit form' } ] } });   

My Controller

  Ext.define ('sencha.controller.main', {extension: 'Ext.app.Controller', idea: [' Mainframe ',' mainframe ',' login '], config: {ref: {loginform:' # loginform '// selector:' # buttonform '}}, init: function () {this.control ({' button [action = submitForm] ': {Tap:' submitcontactform '}}}, submitcontactform: function (btn) {//console.log (' a function '); // var form = this.getLoginform (); var form = btn.up ( 'Formpennial'); form.submit ({url: 'contact.php'});}});   

and my app.js

  Ext'application ([name: 'sencha', Controller: ['main'], view: ['MainView', 'Login', ''], // Store: ['President's shop'], // Model: ['President' model '], lawn F: function () (ext .create ('sencha.view.MainView'); / /Ext.Viewport.add ({// class: 'sencha.view.presidentlist' //})}}}    

Your loginpanel is an issue your id config . That being said, I would recommend using a itemId instead your LoginPanel should look like this:

  Ext. Define ('sencha.view.login', {extension: 'extent penile', xtype: 'LoginPanel', ':' emailfield ', name:' email ', label:' email '}, {xtype:' passwordfield ' Name: '{login}' password, label: 'password'}, {xtype: 'button', text: 'submit', UI: 'confirmation', action: 'submitForm'}]}}}); Finally, your administrator should look something like this:  
  ... config: {refs: {loginform: {autoCreate: true, selector: #loginform ', xtype:' LoginPanel '}}, Control: {' button [action = submitForm] ': {tap: "submitcontactform"}}}}, submitcontactform: function (btn) {//console.log('im A ceremony '); Var form = this.getLoginform (); Form.submit ({url: 'contact.php'}); } ...    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -