/    Sign up×
Community /Pin to ProfileBookmark

what support all IE browsers?

document.all
or document.getElementById
?

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@KorJul 05.2004 — document.all

but this is a deprecate reference and I woun't bet that next IE browser will recognize it. The new WW3 recomandation have been implemented in all new browsers, and are based on [b]getElementById, getElementByName and getElementsByTagName[/b] main refeneces . These are common also with NS6+ and Mozilla browsers.

It is a better choise to use a common IE5+, NS6+, Moz reference (about 95% of users) than a IE4, IE5+ reference (about 80% but IE4 users are very very few and they will be soon "extinct" )?
Copy linkTweet thisAlerts:
@CharlesJul 05.2004 — [font=georgia]// To test for MSIE

[font=monospace]navigator.appName == 'Microsoft Internet Explorer'[/font]

// To test for the MSIE specific DOM, not necessarily backwards or forwards compatible with the above

[font=monospace]document.all[/font]

// To test for the W3C DOM

[font=monospace]document.getElementById[/font][/font]
Copy linkTweet thisAlerts:
@pelegk1authorJul 05.2004 — second Charles ididnt understand how do i execlly check which 1 works and which 1 dosent?
Copy linkTweet thisAlerts:
@CharlesJul 05.2004 — [font=georgia]Each one works but each one does something different. Use the one that does what you want.

And Israel's not so nice a place to live for [url=http://www.vanunu.freeserve.co.uk/]Mordechai Vanunu[/url][/font]
Copy linkTweet thisAlerts:
@fredmvJul 05.2004 — [i]Originally posted by Charles [/i][B]

// To test for MSIE

[font=monospace]navigator.appName == 'Microsoft Internet Explorer'[/font]



// To test for the MSIE specific DOM, not necessarily backwards or forwards compatible with the above

[font=monospace]document.all[/font][/B]
[/QUOTE]
Though note, Opera is by default spoofed as IE and will return [font=courier]true[/font] to both of those tests. For this reason I usually test for the existence of [font=courier]window.opera[/font] as well:typeof window.opera == 'undefined'
Copy linkTweet thisAlerts:
@pelegk1authorJul 06.2004 — Mordechai Vanunu before.

he did big demages to our country security

if he was in the usa he was still stiing in jail and didnt start to see the end of the timehe got yes
×

Success!

Help @pelegk1 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.27,
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,
)...