to update regarding my error. Now I’m getting to the error callback. And I’m getting a:
TypeError io.contentDocument.document is undefined happening here in the code: try { if(io.contentWindow) { xml.responseText = io.contentWindow.document.body? io.contentWindow.document.body.innerHTML:null; xml.responseXML = io.contentWindow.document.XMLDocument? io.contentWindow.document.XMLDocument:io.contentWindow.document; }else if(io.contentDocument) { xml.responseText = io.contentDocument.document.body? io.contentDocument.document.body.innerHTML:null; xml.responseXML = io.contentDocument.document.XMLDocument? io.contentDocument.document.XMLDocument:io.contentDocument.document; } }catch(e) { jQuery.handleError(s, xml, null, e); } however looking at the html via Firebug, i can see the data did come back from the servlet: <iframe id="jUploadFrame1233767850121" name="jUploadFrame1233767850121" style="position: absolute; top: -1000px; left: -1000px;"> <html> <head/> <body> <pre>{”result”:”success”}</pre> </body> </html> </iframe Any idea what’s going on here? On Feb 3, 2:20 pm, Matt <matt.critch...@gmail.com> wrote: > Hi All, > > I'm trying to use the following plugin to allow me to submit data and > upload a file via ajax. The plugin homepage > is:http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ > > The submission itself works fine, the data is being stored and the > file is uploaded. I have a java servlet which i pass a number of > parameters to, and the plugin creates the iframe with the file input > element inside. The servlet returns as content-type application/json > and the json being sent back is either { "result":"success" } or > { "result":"error" } > > The problem is in the response. Instead of the callbacks being called, > an attachment popup is shown in the browser with the name of my > servlet and all the parameters, yet it is of the content-type > application/json. I've verified the response is correct, so I think it > might have to do with how the plugin is handling the iframe response. > Does anyone have any ideas on this? > > Thanks, > > Matt