PDA

View Full Version : sending form parameters



mnask
4 Feb 2008, 2:12 AM
Hi There ,

i have this script to send data to php page via ajax ,
the problem is i dont know how to send the form parameters via extjs
the script is

var dosubmit = function() {
params=Ext.Ajax.serializeForm(form_userID.getForm());
Ext.Ajax.request({
url:'test.php',
params: params,
waitMsg: 'Updating, please wait...',
method:'POST',

callback:function(options,success,response){

if(success)
{
alert(response.responseText);
}
}
});
}


The error msg
F.elements has no properties
[Break on this error] (function(){var B;Ext.lib.Dom={getViewWidth:function(E){return E?this.getDocumen...

i hope you can help me soon

My Regards

Condor
4 Feb 2008, 4:30 AM
Use:


params = Ext.Ajax.serializeForm(form_userID.getForm().getEl());

ps. Why are you using Ext.Ajax.request instead of form_userID.getForm().submit ?

4 Feb 2008, 4:30 AM
try :


yourFormPanel.form.submit({
url : '',
success : function () {

},
failure : function () {

}


});

mnask
4 Feb 2008, 11:40 PM
Thank you so much , its working now :D