Hi,
Im really hoping someone can help here - what im trying to do is have a form upload a file using AJAX with the YUI Dialog widget. The form is submited to an asp.net MVC application and all seems to work fine until the Json string is returned - IE7 then pops up a security warning box instead of processing the returned json encoded string. My js code is;
Code:var dialog = new YAHOO.widget.Dialog("newFile", { width: "30em", fixedcenter: true, visible: true, constraintoviewport: true, modal: true, buttons: [{ text: "Submit", handler: PopupSubmit, isDefault: true }, { text: "Cancel", handler: PopupClose}] }); dialog.setBody('<form id="uploadFile" enctype="multipart/form-data" method="post" action="/File/Upload">' + '<label for="uploadedFile">File:</label> <input type="file" id="uploadedFile" name="uploadedFile" />' + '<input type="hidden" name="assignToId" value="123" />' + '</form>') dialog.setHeader("Add a new File"); dialog.callback.upload = processNewFile; dialog.render(document.body);




Bookmarks