Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10650 closed bug (cantfix)

Specific context in IE6 implies JSONP requests goes through error callback every times

Reported by: dharFr Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:


I had to debug some jsonp request that wasn't working on IE6. After investigating and reducing the code, I figured out that the request was called through a click event binded to a link. This link has a href="javascript:void(0)" attribute and the click callback missed the "return false" statement.

My description may not be very clear but the jsFiddle example speaks by itself: http://jsfiddle.net/EeRUx/

As a summary, in this very particular context ("javascript:void(0)" and no "return false" statement in the click handler), the jsonp request is received by the server but it goes through the error callback every times.

I know that:

  • "javascript:void(0)" in the "href" attribute is not recommended.
  • "return false" statement shouldn't be omitted in this case.

but, to my mind, if the request is correctly received by the server it shouldn't go through the error callback...

  • jQuery versions: tested with 1.5+
  • Browser: IE6 only. Also tested on IE8+, firefox (latest) and Chrome (latest)

Change History (1)

comment:1 Changed 11 years ago by timmywil

Component: unfiledajax
Priority: undecidedlow
Resolution: cantfix
Status: newclosed

This is a known issue in IE6 and partly why the use of the javascript pseudo-protocol is discouraged. http://stackoverflow.com/questions/838275/javascript-void0-problem-in-ie

Note: See TracTickets for help on using tickets.