Javascript in netscap

M

Mayur

Hello friends, pls tell me why this script not working in my netscap7.1
onload function is (document.layers)

function load(){
if(document.all) alert("ie");
if(document.layers) alert("ns");
}
 
M

Michael Winter

Hello friends, pls tell me why this script not working in my netscap7.1

Knowing what you are trying to acheive might help.
onload function is (document.layers)

(document.layers) is not a function. A more explicit example would be good.
function load(){
if(document.all) alert("ie");

Support for document.all does not indicate Internet Explorer. Opera, and
no doubt other browsers, support the collection.
if(document.layers) alert("ns");

Support for document.layers does not indicate Netscape. Netscape 7 will
evaluate the expression, typeof document.layers, to undefined.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top