473,238 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,238 software developers and data experts.

prototyping document.getElementById

It seems to me that document.getElementById and document.all are
essentially the same thing.

I'm thinking of prototyping document.getElementById for those browsers that
understand document.all but not document.getElementById (IE4).

Is that a reasonable thing to do? Suggestions?

Jeff


Jul 20 '05 #1
4 1250
Jeff Thies wrote:
It seems to me that document.getElementById and document.all are
essentially the same thing.

I'm thinking of prototyping document.getElementById for those browsers that
understand document.all but not document.getElementById (IE4).

Is that a reasonable thing to do? Suggestions?


It's easy and has been done before, but IE4 usage is much lower than
Mozilla and browsers with partial IE-DOM support. Furthermore, its CSS
support is so hopelessly antiquated, that you probably couldn't reliably
do things common in newer browsers.

Jul 20 '05 #2
In article <Xc******************@newsread3.news.atl.earthlink .net>, "Jeff
Thies" <no****@nospam.net> writes:
It seems to me that document.getElementById and document.all are
essentially the same thing.

I'm thinking of prototyping document.getElementById for those browsers that
understand document.all but not document.getElementById (IE4).

Is that a reasonable thing to do? Suggestions?


Last modified on 05-05-02
URL: http://www.metalusions.com/backstage/articles/8/
Does precisely what you are trying to do.
--
Randy
Jul 20 '05 #3
JRS: In article <20***************************@mb-m10.aol.com>, seen in
news:comp.lang.javascript, HikksNotAtHome <hi************@aol.com>
posted at Fri, 26 Dec 2003 23:42:47 :-
Last modified on 05-05-02


Please do not post dates like that; it could mean 5th May 2003, May 5th
2002, or 2005 May 2nd. In an international medium, one should follow
international standards, and use YYYY-MM-DD. Actually, that is IIRC in
ANSI X3.30-1985(R1991), FIPS PUB 4-1, 4-2.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 20 '05 #4
JRS: In article <Xc******************@newsread3.news.atl.earthlink .net>
, seen in news:comp.lang.javascript, Jeff Thies <no****@nospam.net>
posted at Fri, 26 Dec 2003 18:36:39 :-
It seems to me that document.getElementById and document.all are
essentially the same thing.

I'm thinking of prototyping document.getElementById for those browsers that
understand document.all but not document.getElementById (IE4).

Is that a reasonable thing to do? Suggestions?

Article
From: hi************@aol.com (HikksNotAtHome)
Newsgroups: comp.lang.javascript
Date: 24 Jun 2003 21:37:32 GMT
Subject: Re: Script Won't Upload in Netscape
Message-ID: <20***************************@mb-m15.aol.com>

included

if (document.all && !document.getElementById) {
document.getElementById = function(id) {
return document.all[id];
}
}

That looks worth a <FAQENTRY> to me; and I put it in my <URL:http://www.
merlyn.demon.co.uk/js-other.htm> as an example of Object Detection.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: lawrence | last post by:
This PHP function prints out a bunch of Javascript (as you can see). This is all part of the open source weblog software of PDS (www.publicdomainsoftware.org). We had this javascript stuff...
12
by: lawrence | last post by:
The following function correctly makes everything invisible but then fails to turn the one chosen DIV back to visible. I imagine I'm getting the syntax of the variable wrong? I've tried this with...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
7
by: PaulB | last post by:
Good Morning everybody, I'm trying to adapt a tutorial script that will handle the behaviour of an "Expanding/Contracting" site-navigation menu. The code that seems to handle the expansion and...
3
by: davidkarlsson74 | last post by:
Error: document.getElementById("folderMenu").cells has no properties File: http://www.volkswagen.se/tillbehor/js/foldermenu.js Rad: 49 The function activates different DIV:s, but doesn't seem to...
1
by: Andre Ranieri | last post by:
Hello, I'm trying to set up an ASP.NET 2.0 form where the user enters values in WebControls.TextBoxes for amount owing, interest and late fees and a JavaScript function totals the three values...
6
by: therig | last post by:
I'm having issues, I've spent many hours searching and I'm a noob at javascript, any help will be greatly appreciated. I keep getting the following error: Error: document.forms.sec11_A has no...
4
by: dr1ft3r | last post by:
Hey guys, I'm building a site for a landscaping business down the street and can't seem to get part of the code functioning correctly. The code fails on line 68 where I make a reference to an...
13
by: RommelTJ | last post by:
Hi, My website (http://www.justiceinmexico.org/indextest.php) looks good in Firefox, but horrible in IE, and I think it's because of an error in the javascript of a free web ticker I got off the...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.