473,808 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Navigator object : how do I get all the inside elements?

Hi all

I am trying to read all the navigator object elements

1. Using the navigator.lengt h returns undefined, cant use for loop;

2.Using and array of known elements like
var a = Array("appCodeN ame","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
Jul 23 '05
13 1820

Hi Robert,
I may have missed this info, what Operating System and what version of
the Operating System are you using? What web browser and version of the
web browser are you using?
IE 6.0.2800.1106
Windows 98 Second Edition 4.10.2222 A

Do you know what line of code is failing?


Navigator typeof object = not supported

Thanks Robert

--
Replies in the same thread please
Windows 98 links to solutions
http://jake98.no-ip.info
Best Regards
Jake
Jul 23 '05 #11
Jake wrote:
<snip>
Do you know what line of code is failing?


Navigator typeof object = not supported


Either that isn't a line of code at all, or it is so generally erroneous
that it should be expected to fail.

Richard.
Jul 23 '05 #12
Hi Richard,

This thread has been going for a while, so here is the function
It gets stuck when the function accesses typeof navigator.plugi ns

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<HEAD>
<script type="text/javascript">
function show(p) {
document.write( '<br>parm = ' + p + '<br>');
for (var i in p) {

try
{
document.write(
"&nbsp;&nbs p;"
+ i +' : '
+' ('
+ typeof p[i]
+ ') '
+ p[i] );
}
catch(e)
{
document.write( "... Error writing out structure. Was " +
p + " of " + i);
}

if (typeof p[i] == 'object') {
show(p[i]);
}
else {
document.write( '<br>');
}
}

}
</script>
</head>

<body>
<script type="text/javascript">
// document.write( navigator.plugi ns.length);
show(navigator) ;
document.write( "<br>Show the document<br>");
show(document);
</script>
</body>

--
Replies in the same thread please
Windows 98 links to solutions
http://jake98.no-ip.info
Best Regards
Jake
Jul 23 '05 #13
"Jake" <me@home.com> wrote in message news:<NN******* *************@h ebe.telenet-ops.be>...
Hi Richard,

This thread has been going for a while, so here is the function
It gets stuck when the function accesses typeof navigator.plugi ns


For some reason in the Winodows 98 version of IE, the statement for
(var i in p) is generating invalid values in variable i. Do not know
the story. I have coded up a workaround.

For testing javascript programs, I recommend using a Gecko based
browser like Netscape 7.1.

Example code follows.

I have not tried all the error paths.

Robert
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<HEAD>
<script type="text/javascript">
function show(p) {
document.write( '<br>parm = ' + p + '<br>');
document.write( 'typeof p = ' + typeof p + '<br>');
if (typeof p == 'object' ) {
try {
for (var i in p) {
try {
document.write(
"&nbsp;&nbs p;"
+ i +' : '
+' ('
+ typeof p[i]
+ ') '
+ p[i] );
}
catch(e) {
document.write( "... Error writing out structure. Was " +
p + " of " + i);
}

if (typeof p[i] == 'object') {
document.write( "<br>[] i = " + i);
show(p[i]);
}
else {
document.write( '<br>');
}
} // of for loop
} // of try for for statement
catch(e) {
document.write( "<br>... for loop control problem. IE seems " +
"prone to these problems. e = " + e + "<br>");
}
} // of is object if
else {
document.write( "... Error. Function expects an object " +
"but didn't get an object.");
document.write( 'typeof p = ' + typeof p + '<br>');
}

} // of function
</script>
</head>

<body>
<script type="text/javascript">
// document.write( navigator.plugi ns.length);
show(navigator) ;
//document.write( "<br><br><br>Sh ow the document<br>");
// show(document);
</script>
</body>
Jul 23 '05 #14

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

Similar topics

3
10695
by: Phil Powell | last post by:
if (is_array($_POST)) { foreach ($this->getAssocSectionsObjArray($key, $dbAP) as $obj) { print_r($obj); print_r(" in array? "); print_r(in_array($obj, $result)); print_r("<P>"); if (!in_array($obj, $result)) array_push($result, $obj); } }
2
3063
by: Lüpher Cypher | last post by:
Ok, here's what I'm trying to do. I have a class. Inside the class I have a method that reads a text file. In the text file I have a class name and a file name where that class is defined. Now, I need to instantiate an object of that class, the problem being that at the time I find out the class name and the file name, I'm inside a method of another class. Well, let me just type up a little example: class MainClass { $obj = null;
4
13000
by: Arjen | last post by:
Hi, I have a class with some attributes. For example class person with name as attribute. I have add multiple persons in an arraylist. Now I need a function to get/find a person by the name attribute. This function returns the index or the object. I can do this with a foreach statement. I think there are better solutions,
6
2244
by: Rufnex | last post by:
Hi, is there a delete for a object inside the constructor, while i init it? i will try something like that: var obj = function(a) { if (!a) delete this; this.a = a; }
8
1881
by: Alexander Walker | last post by:
Hello I am using a Dictionary to store some queues which store instances of a class that I have written I would like to be able to determine whether a particular queue already contains an instance with a particular value Here is the code
2
1515
by: Daz | last post by:
Hi everyone. Sorry for the confusing subject, I couldn't think how best to word it. What I would like to know, is if there is an equivilant to this code, in using JSON. <script type="text/javascript"> function makeTable(number_of_rows) { var table = document.createElement('table'); table.border = 1;
2
2366
by: alchemist | last post by:
Hi everyone. I have a problem about object construction. I have two classes called Flight and ReservationSystem and have a function addFlight() which creates a Flight object and adds it to an array inside ReservationSystem: <Code removed, by request of alchemist, by MODERATOR> when I call this inside main as R.addFlight(100,10,10); if prints Flight 100 successfully added,so creates the object and does everything but then displays...
11
5601
by: hash4sp | last post by:
Hello ! How do i assign tabindex to an object (listbox) that is generated dynamically inside an Iframe. I used the following code onload event of body, but it didnt work. Any suggestions would be appreciated. parent.document.getElementById("CitiesFrame").contentWindow.document.getElementById("city").tabindex='1'; Thanks & regards, Hashmi
1
1618
by: JanetteM | last post by:
Need a line of code using the Navigator object to return the Web browser name to a variable called myBrowserName.
0
10374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10114
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9196
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.