Skip to main content

Bug Tracker

Side navigation

#9855 closed bug (cantfix)

Opened July 19, 2011 12:01AM UTC

Closed July 19, 2011 12:48AM UTC

Last modified July 21, 2011 12:09PM UTC

html(data) function, where the data contains the "onchange" - attribute doesn't attach the onchange event in IE 9

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: manipulation Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

$(document).ready(function () {

$('#div').append('<div>No Event:</div><select onchange="window.alert(' + "'changed'" + ');"><option>Change event not attached</option><option>and not fired in IE 9</option></select>')


<div id="div"></div>

(works fine in FF, Safari)

Attachments (0)
Change History (2)

Changed July 19, 2011 12:48AM UTC by timmywil comment:1

component: unfiledmanipulation
priority: undecidedlow
resolution: → cantfix
status: newclosed

Changed July 21, 2011 12:09PM UTC by dmethvin comment:2

Just to follow up, the reason we can't fix this is because IE does not correctly handle the change event. When you attach this event via a jQuery handler via .bind, .live, or .delegate we make heroic efforts to simulate its behavior. We can't do that for inline handlers. In general, inline handlers are bad practice and we do not recommend using them.