-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery Form Plugin, really doesn't work in IE #302
Comments
Is this a form with a file upload? |
yes, a form with file upload |
Then it helps to understand exactly what the plugin is doing. Since IE < 10 does not support ajax file uploads, the plugin simulates the user experience by submitting the original form with the response targeted to a dynamically created iframe. When the iframe loads the server response, the plugin extracts the response and invokes callback handlers. In the case where the server responds with a header content-type set to "application/json" that trigger's IE's default download behavior. To avoid this, do not set the content-type header to "application/json". Leave it as text/html or text/plain. In the case where the server has an actual error it will return an error response page with appropriate status codes set in the response header. This presents two problems for the plugin:
A potential solution, if you have control over the error response page, is to add attributes on the body element that the plugin will look for. The plugin will attempt to access "status" and "statusText" attributes on the response's body element. So if your error page includes something like Hope this helps. |
Thanks for you explain malsup.
Its just need do little hack for the IE, just not happy with this. |
Thank you, malsup, for the detailed explanation - I was able to change the response header of the web service that was not working in IE<=9 and everything's working now! |
Hello Malsup, Actually I have a problem in upload the file in IE -7,8,9. Can you please let me know how to fix it ? It works fine in other browsers. Thanks |
Hi ishanjain123, Which kind of problem you're facing now? Can you give us some more details? |
Hey Malsup, Could you explain what adding a textarea to the response should help? Thanks for any inputs |
Hi, Can anyone help to understand, why IE is unable to process the Request Header parameters? From Mentioned url: http://malsup.com/jquery/form/#file-upload, when I tried to set Request Header parameter as below (function() { IE unable to get the request header token. whereas other browsers like chrome and firefox are able accept the headers. Thanks. |
Hello @malsup, i am not able to post files using jquery form plugin in IE 9. could you please help me? Actually it is hitting the action method with files but not able to return response from server. it gives an error "Server cannot append header after HTTP headers have been sent." |
I really don't know how can let this Plugin works in IE, If the server response 202, and the response content-type: application/json, the IE tries to download the response.
If server response 505, the response body are gone, I can get nothing in the error handle function.
I really don't know how to use it!! IT IS IE PROBLEM OR PLUGIN DEFECT?
The text was updated successfully, but these errors were encountered: