Article View: comp.lang.javascript
Article #31Re: Navigator object : how do I get all the inside elements?
From: Grant Wagner
Date: Thu, 17 Jun 2004 20:49
Date: Thu, 17 Jun 2004 20:49
37 lines
2127 bytes
2127 bytes
Jake wrote:
> Hi all
>
> I am trying to read all the navigator object elements
>
> 1. Using the navigator.length returns undefined, cant use for loop;
>
> 2.Using and array of known elements like
> var a = Array("appCodeName","appName","appVersion");
> I seem to miss something to get it combined like navigator.a[i]
>
> Anyone can help me a bit? Thanks
for (var prop in navigator) {
document.write(
prop + ' = ' + navigator[prop] +
' (' + typeof navigator[prop] + ')' +
'<br>'
);
}
--
| Grant Wagner <gwagner@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
Technical Details
Message-ID:
<40D203AC.9FFC6DDD@agricoreunited.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!cyclone.bc.net!news-in.mts.net!news2.mts.net.POSTED!not-for-mailReferences:
<n1hAc.351$jQ4.113984632@hebe.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb3cb,adc686cc451a4c5a X-Google-Thread: 100e17,adc686cc451a4c5a X-Google-Attributes: gidfb3cb,gid100e17,public Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!cyclone.bc.net!news-in.mts.net!news2.mts.net.POSTED!not-for-mail Message-ID: <40D203AC.9FFC6DDD@agricoreunited.com> From: Grant Wagner <gwagner@agricoreunited.com> X-Mailer: Mozilla 4.78 [en]C-CCK-MCD UGG20011025 (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.javascript,alive.internet.lang.javascript Subject: Re: Navigator object : how do I get all the inside elements? References: <n1hAc.351$jQ4.113984632@hebe.telenet-ops.be> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 39 Date: Thu, 17 Jun 2004 20:49:20 GMT NNTP-Posting-Host: 165.23.247.49 X-Complaints-To: admin@mts.net X-Trace: news2.mts.net 1087505360 165.23.247.49 (Thu, 17 Jun 2004 15:49:20 CDT) NNTP-Posting-Date: Thu, 17 Jun 2004 15:49:20 CDT Organization: MTS Internet