Opened 15 years ago
Closed 14 years ago
#3155 closed bug (invalid)
Request method GET in Internet Explorer 6 & 7
Reported by: | jzajpt | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | ajax | Version: | 1.2.6 |
Keywords: | ie7, ajax, get, post | Cc: | |
Blocked by: | Blocking: |
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");
Change History (3)
comment:1 Changed 15 years ago by
comment:2 Changed 14 years ago by
If the request includes *any* data, IE will assume POST. The $.ajax() code takes care of this for GET requests by appending settings.data to settings.url and clearing settings.data, but the global ajax events are triggered after that fix has been applied. So, on a GET request you must add to settings.url, not settings.data.
comment:3 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Forgot one thing, the error is happening only when following code is present:
Replying to jzajpt: