473,698 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript not working with Safari/Firefox (Mac)

JB

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
Jul 23 '05 #1
3 6446
VK
Change:
....
if (document.all) {
menu.innerHTML= menucontent
}
....

to

....
if ((document.getE lementById)||(d ocument.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.
Jul 23 '05 #2
JB
VK wrote <41************ *********@news. freenet.de> dd. 06-11-2004 17:45:
Change:
if (document.all) {
menu.innerHTML= menucontent
}} to if ((document.getE lementById)||(d ocument.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
Jul 23 '05 #3
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.
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2451
by: Foreman | last post by:
Using ASPFileUpload (http://support.microsoft.com/default.aspx?scid=kb;en-us;299692) and works for IE6 and FireFox but not Safari. Thanks in advance for your assistance.
2
4733
by: Mick White | last post by:
http://www.mickweb.com/javascript/arrays/cardhand.html http://www.mickweb.com/javascript/arrays/cards.js Viewing the first URL in my installed version of Firefox (.8, Mac), the following HTML entities: S=["&hearts;","&diams;","&clubs;","&spades;" "&hearts" are rendered as various "pipe" symbols. Is this a limitation of the browser, or am I doing something wrong?
5
2549
by: googlegroups | last post by:
I have a large table in html created dynamically. This table can grow to several hundred rows or more. I have the ability to hide or display individual rows (using row.style.display = "none") and this works well in both IE and Firefox. I would also like to do the same with columns as well. I did some research and col and colgroup nodes are not supported fully in both browsers. Also, doing "visibility: hidden" and sometimes "display:...
34
3846
by: Simon Wigzell | last post by:
document...focus() will scroll the form to move the specified text field into view on everything I have tried it with except Safari on the MAC. The form doesn't move. Any work around? Thanks.
7
3959
by: petermichaux | last post by:
Hi, I have tried the following based on suggestions of the best way to insert JavaScript into a page. This is instead of using eval(). Unfortunately IE says "unexpected call to property or method access" for the second to last line of my function. If you know what I've done wrong or how to fix it I would appreciate the help.
14
2301
by: maidane | last post by:
Hi, I got the following situation using the AC_Quicktime library. Apple recommend to use a Javascript call to generate the OBJECT tag (http://developer.apple.com/internet/ieembedprep.html). I am storing String entries representing the innerHTML of a div that I will update at runtime. As a result, some of these string entries are actually loooking like: <script language="JavaScript" type="text/javascript">
6
1782
by: marckatsambis | last post by:
Hi, Apologies in advance if this seems long winded and confusing... I'm trying to make a javascript drop down menu work around multiple iframes. The initial page (http://www.redstudioweb.com/client/ars/frames/ photoframe/pf_hwire.htm) is calling 2 iframes. The first is called 'sourceframe' which loads information regarding the sub-menu
3
1951
by: sonsofsound77 | last post by:
Hi all I'm new to JavaScript and working my way through the Teach yourself JS 1.5 book. All of the scripts in the book work perfectly apart from the listing 20.3 piano example. http://www.jsworkshop.com/js15/list20-3.html I am using an iMac G5 Mac OSX 10.4.10 Tiger and am getting the error document.embeds.play(); is not a function This is the actual code <title>JavaScript Piano</title>
3
3439
by: Arodicus | last post by:
This is bugging me: how do I reference the topmost node (HTML) within a document? I'd like to set a class on it, which specifies various browser/os/versions so that several browser/os/version-specific css bugs may be addressed without coding. eg: <HTML class="_IE _IE7 _Win _IE7Win"> The closest I've come is document.body.parentNode (line 22, below), but this of course requires that my script be executed from within body... I'd prefer to...
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.