Javascript diagnostics in Netscape

brutfood II

Registered
I have a very recent version of Netscape navigator running on Mac OS 10.1

I'm trying to make my JavaScript work on both Explorer and Netscape. However, whearas Explorer gives me error diagnostics, and even shows me the line where the error was detected - I can't find this feature in Navigator.

Life is so much easier with error diagnostics. Can anyone help?
 
Thanks bear - doh! How could I miss it. Ok, I've now found the root of my problem that I was struggling to debug. It is also affecting websites that I've made in the past :(, because it is a problem with new versions of Netscape Navigator being backwards incompatible with old versions.

The following JavaScript doesn't work anymore in newer versions of Netscape Navigator :-

function find(obj, d) {//find an object
var i,x;
if(!d) d=document;
if(!(x=d[obj])&&d.all) x=d.all[obj]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[obj];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=find(obj,d.layers.document);
return x;
}

I am using this Javascript to find something like this:-

<DIV ID="myname">&nbsp;</DIV>

This routine is based on a Dreamweaver 3 generated bit of code - which means the problem is probably quite widespread. I know this forum is possibly not technical enough for issues like this - but If anyone out there can explain to me why this old javaScript doesn't work anymore in new Netscape Browsers? And how I'm supposed to remedy the problem? - well that would be great!
 
Back
Top