🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.javascript
3 messages
3 total messages Started by Jake Thu, 17 Jun 2004 13:29
Navigator object : how do I get all the inside elements?
#29
Author: Jake
Date: Thu, 17 Jun 2004 13:29
16 lines
1331 bytes
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	

-- 
Windows98 links to solutions  http://jake98.no-ip.info 
Replies in the same thread please
Regards Jake
Re: Navigator object : how do I get all the inside elements?
#30
Author: kaeli
Date: Thu, 17 Jun 2004 15:08
21 lines
1382 bytes
In article <n1hAc.351$jQ4.113984632@hebe.telenet-ops.be>, me@home.com 
enlightened us with...
> Hi all
> 
> I am trying to read all the navigator object elements
> 

Why?
It rarely does anything useful.

If you're trying to do browser detection, it's worthless.
If you're trying to do plugin detection, I believe there's a better way 
for that, too, but I'd have to go look it up.

-- 
--
~kaeli~
Contrary to popular opinion, the plural of 'anecdote' is 
not 'fact'. 
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Re: Navigator object : how do I get all the inside elements?
#31
Author: Grant Wagner
Date: Thu, 17 Jun 2004 20:49
37 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads