Opened 13 years ago
Closed 12 years ago
#6741 closed bug
event binding issue when append html by using $.html() in IE
Reported by: | walter | Owned by: | walter |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | core | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
there are two pages, A.htm and B.htm I ajax load page B.htm in A.htm. but i found that events binding in B.htm does not work in ie. there are the codes:
======================================================= a.htm
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>
<script src="jquery-1.4.2.js" type="text/javascript"></script>
</head> <body>
<a href="#" onclick="$('#container').load('B.htm');" >ajax load B.htm</a>
<div id="container"></div>
<script type="text/javascript">
$.ajaxSetup({ cache: false });
</script>
</body> </html>
b.htm =======================================================
<input type="button" onclick="alert('button click!');" value="click me to test onclick"/> <script type="text/javascript"></script>
repro steps:
- open a.htm in ie
- click the link to load A.htm, then you can see a button
- click the button to check weather the 'cnclick' event fire by a popup message box.
description:
- this issue only repro in ie
- if B.htm doesn't contains any script tag, everything is fine.
- the scripts include in script tag work fine.
can anybody help?
Change History (4)
comment:1 Changed 12 years ago by
Owner: | set to walter |
---|---|
Priority: | → undecided |
Status: | new → pending |
comment:3 Changed 12 years ago by
Status: | new → pending |
---|
Please provide a live test case demonstrating this issue.
comment:4 Changed 12 years ago by
Status: | pending → closed |
---|
Automatically closed due to 14 days of inactivity.
Is there a particular version of IE where you are experiencing this problem?