jQuery: The Write Less, Do More JavaScript Library

Ticket #3155 (new bug)

Opened 1 month ago

Last modified 1 month ago

Request method GET in Internet Explorer 6 & 7

Reported by: jzajpt Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.3 Component: ajax
Version: 1.2.6 Keywords: ie7, ajax, get, post
Cc: Needs: Review

Description

When using Internet Explorer 6 & 7, simple code below uses POST method instead of GET (and for example in Rails causes invocation of wrong action when being RESTful):

$.get("example", function(data){
  alert(data);
});

Also, following examples use POST too instead of GET.

$.ajax({
  url: "example",
  type: "GET",
  success: function(html){
   alert(html);
  }
});
$("#example").load("example");

Attachments

Change History

in reply to: ↑ description   Changed 1 month ago by jzajpt

Forgot one thing, the error is happening only when following code is present:

$(document).ajaxSend(function(event, request, settings) {
 if (typeof(AUTH_TOKEN) == "undefined") return;
   settings.data = settings.data || "";
   settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(AUTH_TOKEN);
});

Replying to jzajpt:

When using Internet Explorer 6 & 7, simple code below uses POST method instead of GET (and for example in Rails causes invocation of wrong action when being RESTful): {{{ $.get("example", function(data){ alert(data); }); }}} Also, following examples use POST too instead of GET. {{{ $.ajax({ url: "example", type: "GET", success: function(html){ alert(html); } }); }}} {{{ $("#example").load("example"); }}}

Note: See TracTickets for help on using tickets.