|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
hi everyone,
i have an app that need the browser submit method. i currently follow the guide to add the config into the formpanel as following:
i trace with firebug and figure out that the form dose not have the action attr at all.. how can i solve this problem? thanks |
|
#2
|
||||
|
||||
|
The docs don't match the class any more (Ext 2.0), but then the new class makes it difficult to specify a browser submit.
I think Jack needs to explcitly support browser submits rather than use that kludge of setting properties through the config option. The problem is that the configs are shared. And where is the built-in FormPanel.submit? FormPanel.getEl() returns the container Element. FormPanel.getForm() returns the Form. |
|
#3
|
|||
|
|||
|
i workaround of it and solve the problem as adding the attr of 'action':
|
|
#4
|
|||
|
|||
|
I am having similar difficulties. Using your method above, I was finally able to get it to submit, but it is ignoring the baseParams. I have several extra parameters to pass. Perhaps I should try a hidden form field?
But I agree is Animal, this is klunky. I expect (and the docs lead me to believe this) that I should be able to set the following :
|
|
#5
|
|||
|
|||
|
Hi all,
My apologies...I am both an ExtJS and Javascript newbie....but, I'm NOT a programming newbie. Whatever the case, I'm COMPLETELY stumped on two counts:
var loginForm = new Ext.form.FormPanel({
id: 'loginForm',
url: /auth/identity/login/',
// method: 'POST',
labelWidth: 75, // label settings here cascade unless overridden
frame: true,
title: 'Login',
bodyStyle: 'padding: 5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'Username',
name: 'username',
allowBlank: false,
maxLength: 32,
value: ''
, emptyText: 'username'
}, {
fieldLabel: 'Password',
name: 'password',
allowBlank: false,
inputType: 'password',
maxLength: 32
}],
buttons: [{
text: 'Login',
type: 'submit',
handler: function() {
loginForm.submit();
}
}],
onSubmit: Ext.emptyFn,
submit: function() {
alert("'Bout to submit...");
this.getEl().dom.setAttribute('action', 'userAuth.aspx?ac=login');
this.getEl().dom.submit();
alert("Done submitting...!");
}
});
loginForm.render('loginForm');
Thanks in advance for your help. Travis |
|
#6
|
|||
|
|||
|
if i understand correctly what you are trying to do, then you need this:
this.form.el.dom.submit() instead of this.getEl().dom.submit() |
|
#7
|
||||
|
||||
|
Yes, an Ext 2.0 FormPanel is not a subclass of BasicForm the way an Ext 1.* Form was. It contains a BasicForm, so to get at the DOM form, you'd use
myFormPanel.getForm().getEl() |
|
#8
|
|||
|
|||
|
Hi, Animal,
Thanks. It appears that the following should be used (for me ) instead of what's in the documentation: onSubmit: Ext.emptyFn,
submit: function() {
this.getForm().getEl().dom.setAttribute('method', 'POST');
this.getForm().getEl().dom.setAttribute('action', 'myactionurl');
this.getForm().getEl().dom.submit();
}
|
![]() |
| Thread Tools | |
|
|