Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // JSP file returned from backend
- <html>
- <body>
- <textarea>
- ${errors}
- </textarea>
- </body>
- </html>
- // js iframe posting.
- function ioIframeGetJson(postUrl){
- var td = dojo.io.iframe.send({
- url: postUrl,
- form: "importForm",
- method: "post",
- content: {
- name: "uploadedfile" // file name in the form
- },
- timeoutSeconds: 20,
- preventCache: true,
- handleAs: "json",
- handle: function(res){
- if(res.$errors) {
- alert("SUCCESS");
- } else
- alert('Error1');
- },
- error: function (res) {
- alert('Error2');
- }
- });
- }
Add Comment
Please, Sign In to add comment