PDA

View Full Version : Ajax.formRequest: Callback not fire..



kevin.dewi
3 May 2007, 3:56 AM
Hello,

I have a little problem. I will automatic commity a file-upload form with the formRequest method of Ext.lib.Ajax.:


var config = {
success: function () { alert("ok"); },
failure: function () { alert("Fehler beim Hochladen des Bildes"); }
};


Ext.lib.Ajax.formRequest("imageUpload", "/index.php?modul=admin_location&action=upload_image", config, null, true, null );


The form was successful committed but the callback method (...alert("ok") in this test-code..) will not invoke.

Any help appreciated.

tryanDLS
3 May 2007, 7:45 AM
Did you get valid response back? Assuming you're using the yui adapter, set a BP in YAHOO.util.Connect.handleTransactionResponse to see what's happening.

jsakalos
3 May 2007, 10:40 AM
I don't know if also this call requires it but I suppose the server should respond with "{success:true}".