PDA

View Full Version : When submit a form "Syntax error" will throw in ext-all.js



Ramesh.R
12 Oct 2009, 5:45 AM
When submit a form "Syntax error" will throw in ext-all.js
I m using FileUploadField , in its 'fileselected' event i submit a form to the server and returns "text/Xml" content from the server.

After that i will not receive any sucess or failure msg.

but the system throw the "Syntax error" in ext-all.js (error shown in ext-all.js file is
function(json){return eval("("+json+")")})

here my code:

var fbutton = new Ext.ux.form.FileUploadField({
renderTo: 'my-div,
buttonOnly: true,
listeners: {
'fileselected': function(fb, v) {

Ext.getCmp('Myform').getForm().submit({
url: '/Form/UploadFile',
success: function(form,action)
{
alert("Success")
},
failure: function(form, action) {
alert("Failured");
}
})

}
}
});

Please any tell me what is the probelm in my code.

Jack9
12 Oct 2009, 8:43 AM
Did you mean alert(Failured); or alert("Failure"); ?

Ramesh.R
13 Oct 2009, 1:34 AM
Did you mean alert(Failured); or alert("Failure"); ?


alert("Failured"); only

fransa
9 Nov 2009, 6:44 AM
I have exactly the same issue in IE, FF works fine!!

Animal
9 Nov 2009, 6:59 AM
This is all explained at http://www.extjs.com/deploy/dev/docs/?class=Ext.form.Action.Submit