PDA

View Full Version : formUpload error



krycek
28 Jun 2007, 7:28 AM
JS:


Ext.get('file-submit-response').getUpdateManager().formUpdate('formUpload', 'teste.php', false, function (o) { console.log(o); });


html:


<form id="formUpload" name="formUpload" method="POST" action="teste.php" enctype="multipart/form-data">
<input type="file" id="fileUpload" name="fileUpload" />
<input type="submit" value="Enviar" id="mySubmitBtn" />
<div id="file-submit-response">dasdsadsa</div>
</form>



Erro:

response.argument has no properties
[Break on this error] if(response.argument.form && response.argument.reset){


but the file is being uploaded succefully. Whats wrong?

krycek
28 Jun 2007, 3:26 PM
i think it's a bug... because on the formUpdate there is:

argument: {'url': url, 'form': form, 'callback': callback, 'reset': reset}

but the response object contains a responseText and a responseXML. No argument, success, upload, failure, etc params... and the response is created by extjs

:-?

krycek
1 Jul 2007, 2:38 PM
any help?

potdarko
2 Jul 2007, 11:58 AM
I'm having issues since i upgraded to 1.1-beta2. Files are submitted (both FF & IE) but i get errors (missing ) when parsing the json string) on FF and everything working 100% in IE.

tryanDLS
2 Jul 2007, 12:19 PM
What's 'missing'? Can you post a simple sample that illustrates the problem.

potdarko
2 Jul 2007, 4:50 PM
i was getting (FF 2.0.0.4) an error:

missing ) in parenthetical --->ext-all-debug.js (line 6454)
after submitting, instead of {success:true}, the json parameter when calling decode() was:


Firebug Watch json
"{success:true}<div style="position: absolute; width: 28px; height: 28px; z-index: 1000; display: non..."

and thus the error in the eval here:

ext-all-debug.js

6453 this.decode = function(json){
6454 return eval("(" + json + ')');
6455 };

i'm sure it's my fault. :D

krycek
3 Jul 2007, 4:19 AM
I think that should be an "Common Problems" in the docs (BasicForm and Form classes) about what server-side should return in case of file uploads.