forms - handler for a submit button -


i want use save button form in extjs. have handler

{          xtype: 'button',          handler: function(button, event) {              var form = this.getform();              if (form.isvalid()) {                 ext.messagebox.alert('submitted values', form.getvalues(true));                                  }                                            },           height: 37,           id: 'configurationdriverssave',           text: 'save' } 

all in firebug error: this.getform not function. doing wrong?

in handler this reference button itself. can check in firebug, button of course doesn't have method getform(). need call 'this.up('form')`.

second thing - don't have manual validation trying do. extjs has built-in validation mechanism forms.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -