javascript - Jquery ajax() call fails in IE8 -


I have the following code to send data from the forms of Ajax class AJAX . It works perfectly in Firefox, Safari and Chrome but fails in IE.

  Ajax: function () {$ ('form.ajax'). Live ('submit', function () {var Form_ajax = $ (this); $ .jax ({url: form_ajax.attr ('verb'), data: form_ajax.serialize (), type: form_ajax.attr ('method '), Data type:' script ', precede: function (Excerpt) {$ (' #Age-bid-new.exx-bid-new.ajax-bid-new.ajax-bid-new.jax form-success '). Remove (); form_ajax.slideUp ();}}); Description is false;});  

Please help - I've been stuck here for the last 2 days. Inside the browser I'm returning a JavaScript file from the server to evaluate. It works as expected in Firefox, Chrome and Safari, but IE receives it as a file and opens the file download dialog

I use it to work with IE What can i do I tried leaving the following code in my application.js file (I am getting a rail project beating)

  // public / javascripts / application.js jQuery .ajaxSetup ({'beforeSend': function (xhr) {xhr.setRequestHeader ("Accepted", "Text / Javascript"}}})  

I get the same behavior from IA < Write block like code> AjaxSetup above.

It seems that live Tried to:

  $ ('form.ajax'). Submit (function () { 

Comments