Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#6368 closed bug (duplicate)

jQuery Live binding to form submit in IE

Reported by: ahsteele Owned by:
Priority: undecided Milestone: 1.4.3
Component: event Version: 1.4.2
Keywords: live Cc:
Blocked by: Blocking:

Description

In Internet Explorer 8 (IE8) binding to the submit event with live does not work but does work in Firefox, Chrome, and Safari.

$('form').live('submit', function (event) {......});

See http://forum.jquery.com/topic/ie-specific-issues-with-live-submit for discussion.

Change History (6)

comment:1 Changed 10 years ago by spudly

i have the same problem. I do this instead, but it won't work if I dynamically add a form element... $(function () { $('form').bind('submit', handle_submit); });

I would much rather write $('form').live('submit', handle_submit);

comment:2 Changed 9 years ago by john.firebaugh

It's not as simple as described above.

The following works:

http://gist.github.com/583117#file_failing.html

However, with a previous live('click'), as described by http://dev.jquery.com/ticket/6359, it fails:

http://gist.github.com/583117#file_working.html

comment:3 Changed 9 years ago by john.firebaugh

Sorry, swap the failing/working links in the previous comment.

comment:4 Changed 9 years ago by john

Priority: undecided
Resolution: duplicate
Status: newclosed

So yeah - this appears to be a duplicate of #6359.

comment:5 Changed 9 years ago by petersendidit

From what I can see with my testing this was solved in 1.4.3

http://jsfiddle.net/petersendidit/ytxXG/1/

comment:6 Changed 9 years ago by eski009

I think the problem can still be seen here http://jsfiddle.net/ytxXG/9/

Works fine in all browsers except IE8 and below.

Just tried it in jQuery up to 1.5

Note: See TracTickets for help on using tickets.