Javascript not working with Safari/Firefox (Mac)

V

VK

Change:
....
if (document.all) {
menu.innerHTML=menucontent
}
....

to

....
if ((document.getElementById)||(document.all)) {
menu.innerHTML=menucontent
}
....

(Actually document.all is not needed at all, but let's keep the code as
close as possible to the the unknown author's original).

This is a war time script (Great Browsers' War), and its way to determine
platforms is obsolete for 3-4 years at least.
 
J

JB

VK wrote said:
Change:
if (document.all) {
menu.innerHTML=menucontent
}}

if ((document.getElementById)||(document.all)) {
menu.innerHTML=menucontent
}}
(Actually document.all is not needed at all, but let's keep the code
as close as possible to the the unknown author's original).
This is a war time script (Great Browsers' War), and its way to
determine platforms is obsolete for 3-4 years at least.


Thanks!
 
F

Fred Oz

JB said:
Navigation is not possible on a Mac with Safari/Firefox on:
http://www.kerst.karelv.nl/frames/navigatie.html

Why does the javascript script not work?

The page highlights the folly of making your page utterly dependent on
JavaScript. One small error or incompatibility and the entire page is
useless.

I would be much better to write the contents of the page as HTML, then
use JavaScript to modify it, that way users without JS or whose
browsers are incompatible can still use the page.

Fred.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top