Javascript not working with Safari/Firefox (Mac)

Discussion in 'Javascript' started by JB, Nov 6, 2004.

  1. JB

    JB Guest

    JB, Nov 6, 2004
    #1
    1. Advertising

  2. JB

    VK Guest

    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.
    VK, Nov 6, 2004
    #2
    1. Advertising

  3. JB

    JB Guest

    VK wrote <418d00c5$0$157$> 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
    JB, Nov 6, 2004
    #3
  4. JB

    Fred Oz Guest

    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.
    Fred Oz, Nov 7, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gabe garza

    Safari and Firefox on MAC OS X

    gabe garza, Mar 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    508
    gabe garza
    Mar 29, 2005
  2. Brett

    ASP:Control Not Working in Firefox or Safari

    Brett, Feb 7, 2008, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    147
    Brett
    Feb 7, 2008
  3. Foreman
    Replies:
    5
    Views:
    211
    Foreman
    Jan 25, 2005
  4. Replies:
    4
    Views:
    249
    Randy Webb
    Feb 18, 2006
  5. Terry
    Replies:
    1
    Views:
    111
    Terry
    Oct 20, 2007
Loading...

Share This Page