| Author |
IE 7 Issue with setAttribute
|
Muhammad Saifuddin
Ranch Hand
Joined: Dec 06, 2005
Posts: 1291
|
|
Hello Everyone,
I am doing a similar thing in my task to submit a button on "onchange" event, this things working in all browsers accept IE 6 & IE 7.
any help would be appreciated.
Thanks,
|
Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50652
|
|
|
Why are you using setAttribute() at all? Rather than the usual:
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 14999
|
|
http://webbugtrack.blogspot.com/2007/08/bug-242-setattribute-doesnt-always-work.html
Eric
|
 |
Muhammad Saifuddin
Ranch Hand
Joined: Dec 06, 2005
Posts: 1291
|
|
Thanks Bear for tips. This works..
would you please elaborate me. how the IE understand this code.. instead.
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50652
|
|
the element.onchange part is the reference to the onchange property of the element. This property is expected to be a reference to the change handler for the element (if any).
The function() { /*whatever */ } part is an inline anonymous function. We could also specify the name of an existing function here, but if there's no reason for the function to be declared separately and pollute the global namespace, it is preferred to use anonymous functions.
|
 |
 |
|
|
subject: IE 7 Issue with setAttribute
|
|
|