Bug Tracker

Opened 8 years ago

Closed 8 years ago

#6936 closed bug (worksforme)

IE7 AJAX Bug

Reported by: Alize Owned by:
Priority: low Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: ajax, ie7, 1.4.2, get Cc:
Blocked by: Blocking:

Description

IE7 returns an error when doing an AJAX call for the first time, refreshing fixes it.

To test, browse to one page, then browse to page with AJAX call on it.

Code in body:

<script type="text/javascript"> $.get('test.php', function(data) {

alert('test');

}); </script>

1.4.2 doesn't pop up with 'test' on first page load, refresh and it does, 1.3.2 works as it should.

Attachments (1)

test.html (490 bytes) - added by Alize 8 years ago.
This code will not work on IE7 on FIRST page load, subsequent refreshes will work

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Alize

Attachment: test.html added

This code will not work on IE7 on FIRST page load, subsequent refreshes will work

comment:1 Changed 8 years ago by dmethvin

The $.ajax call occurs before document.ready(). That may have something to do with it. It should work afaik.

comment:2 Changed 8 years ago by addyosmani

Keywords: get added
Priority: low
Resolution: worksforme
Status: newclosed

When called within $(document).ready() this is working fine in IE7, 8 and 9. As dmethvin originally stated the error you were receiving is most likely due to $.ajax/$.get being called before the document had finished fully loading.

Note: See TracTickets for help on using tickets.