javascript - Jquery ajax() call fails in IE8 -
javascript - Jquery ajax() call fails in IE8 -
i have next code submitting info using ajax forms of class ajax
. works in firefox, safari , chrome fails in ie.
ajax: function() { $('form.ajax').live('submit', function() { var form_ajax = $(this); $.ajax({ url: form_ajax.attr('action'), data: form_ajax.serialize(), type: form_ajax.attr('method'), datatype: 'script', beforesend: function(xhr) { $('#ajax-bid-new .ajax-form-error, #ajax-bid-new .ajax-form-success').remove(); form_ajax.slideup(); } }); homecoming false; });
please help - stuck here past 2 days. returning javascript file server evaluated within browser. works expected in firefox, chrome , safari, ie receives file , opens file download dialog.
what can in ie create work? tried dropping next code in application.js
file (i'm doing rails project btw)
// public/javascripts/application.js jquery.ajaxsetup({ 'beforesend': function(xhr) {xhr.setrequestheader("accept", "text/javascript")} })
i same behavior ie after writing ajaxsetup
block above.
looks live
doesn't work submit
in ie. have tried using normal submit instead:
$('form.ajax').submit(function() {
javascript jquery ajax internet-explorer
Comments
Post a Comment