/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] removeAttribute IE problem…

Can anyone shed some light for me on this.

This bit of code works find in everything but IE from what i have tested.

[CODE]
for(var i = 0; i < durations.length; ++i){
radio[i] = document.getElementById(this.options.durations[‘short’][i]);
if(radio[i].hasAttribute(‘disabled’)){
radio[i].removeAttribute(‘disabled’);
}
}
[/CODE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Feb 05.2007 — you are probably going to have to change

<i>
</i>if(radio[i].hasAttribute('disabled')){
radio[i].removeAttribute('disabled');
}


to

<i>
</i>if(radio[i].disabled){
radio[i].disabled = false;
}


Eric
Copy linkTweet thisAlerts:
@sbriouxauthorFeb 05.2007 — Yeah i was looking in the wrong spot. Just found some articles on IE not supporting the hasAttribute in DOM...

Thank you very much for your help.... what you stated appears to be working. I suppose had i have done a proper check to see if the function was avail then i would have avoided this right from the start... lesson learned
×

Success!

Help @sbrioux spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...