Javascript not working with Safari/Firefox (Mac)


Ad

Advertisements

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!
 
Ad

Advertisements

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.
 

Top