Skip to main content

Posts

Showing posts with the label dojo

Dojo require() and AMD (1.7)

I'm having a heckuva time transitioning to Dojo and the new AMD structure, and I'm really hoping someone can shed some light on the whole concept. I've been living on Google for the last few weeks trying to find information on not the usage, but the structure and design pattern trends in using this.

file upload using dojo.io.frame.send doesn't work in IE the first time

I'm trying to do an ajax file upload using dojo.io.frame.send(). It works with FF and chrome without any issues but not in IE 8 (not sure about other versions). The code is pasted below: function submitForm() { dojo.require("dojo.io.iframe"); dojo.io.iframe.send({ url : "/uploadfile.do", form : "myForm", method: "POST", handleAs: 'text', load : function(response, ioArgs) { return response; }, error : function(response, ioArgs) { return response; } }); return false; } I searched on the web and found this: http://groups.google.com/group/dojo-interest/browse_thread/thread/17dace02652bcec3 which prompted me to add the following snippet after dojo.require() line in the above code: if ((dojo.isSafari || dojo.isIE) && dojo.io.iframe["_frame"]) { dojo.destroy(dojo.io.iframe['_frame']); var frameName = dojo.io.iframe._iframeName; dojo.io