1christine
12-22-2003, 01:37 PM
Now, I'm trying to create an alert box that will show all the navigator properties at the same time with a break line between each property.
This is the code I have so far but can't get it into 1 alert box with the break line.
I can get it to break, but it does this for each property.
I think I could do with an array code but I don't quite understand 'array'
<HTML>
<HEAD>
<TITLE>Navigator Properties</TITLE>
</HEAD>
<BODY>
<PRE>
<SCRIPT LANGUAGE="JavaScript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
for (prop in navigator) {
var navigProp = (prop + ": " + navigator[prop]);
alert(navigProp);
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</SCRIPT>
</PRE>
</BODY>
</HTML>
This is the code I have so far but can't get it into 1 alert box with the break line.
I can get it to break, but it does this for each property.
I think I could do with an array code but I don't quite understand 'array'
<HTML>
<HEAD>
<TITLE>Navigator Properties</TITLE>
</HEAD>
<BODY>
<PRE>
<SCRIPT LANGUAGE="JavaScript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
for (prop in navigator) {
var navigProp = (prop + ": " + navigator[prop]);
alert(navigProp);
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</SCRIPT>
</PRE>
</BODY>
</HTML>