#10345 closed defect (fixed)
Bug IE dojo.attr with events (or doc omission)
Reported by: | piopier | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | low | Milestone: | 1.4.1 |
Component: | Documentation | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When passing a string as an event property in dojo.attr or dojo.create (e.g dojo.attr(n, "onclick", "myfunction(myparam);") )
the event launches on FF but not on IE. Seems to be due to the fact that dojo.attr code uses "n.setAttribute" in this case, instead of "d.connect" .
This should either be corrected, or the documentation could simply specify that attaching an event with dojo.attr/dojo.connect REQUIRES to use a function and not a string.
Change History (10)
comment:1 Changed 13 years ago by
Milestone: | tbd → future |
---|---|
Owner: | changed from anonymous to Eugene Lazutkin |
comment:2 Changed 13 years ago by
Milestone: | future → 1.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:6 Changed 13 years ago by
Very simple : the following page displays the alert box on FF3.5, it doesn't on IE7.
<html> <head> <script type='text/javascript' src='js/dojo/dojo.js'></script> </head> <body><form> <p id='abc'></p> <script> dojo.create("span",{innerHTML:"click here...",onclick:"alert('onclick works');"},"abc"); </script> </form></body></html>
comment:7 Changed 13 years ago by
Milestone: | 1.4 → 1.4.1 |
---|
Yeah, it looks like the documentation should be more explicit about functions rather than strings for event handlers.
comment:8 Changed 12 years ago by
Component: | Core → Documentation |
---|
comment:10 Changed 12 years ago by
Note: See
TracTickets for help on using
tickets.
It looks like it was fixed in the course of other ticket. Please reopen with a test case if you can reproduce the bug.