Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Javascript not working with Safari/Firefox (Mac)

Reply
Thread Tools

Javascript not working with Safari/Firefox (Mac)

 
 
JB
Guest
Posts: n/a
 
      11-06-2004

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?

--
JB
 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      11-06-2004
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.


 
Reply With Quote
 
 
 
 
JB
Guest
Posts: n/a
 
      11-06-2004
VK wrote <418d00c5$0$157$(E-Mail Removed)> dd. 06-11-2004 17:45:

> 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.



Thanks!

--
JB
 
Reply With Quote
 
Fred Oz
Guest
Posts: n/a
 
      11-07-2004
JB wrote:
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Javascript not working in Firefox "event not defined" Wiseman Javascript 1 07-25-2008 03:04 PM
Working with XML in JavaScript / Как работать с XML в Javascript'е? noff Javascript 0 06-14-2007 12:46 PM
wifi not working on new hp, or not working after live update =?Utf-8?B?RHJhZ29ueA==?= Wireless Networking 1 10-01-2005 11:17 PM
Cookies working on intranet but NOT working on Internet Martin Heuckeroth ASP .Net 5 04-01-2005 01:37 AM
Regular Expression validators NOT working, Required Field validators ARE working Ratman ASP .Net 0 09-14-2004 09:36 PM



Advertisments