SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please help correct my Javascript for NS

    I've tested my site on IE6 and the latest AOL browser. OK there. However, my popup menu script (taken from the Visual Quickstart Guide on DHTML) won't run in Netscape. Can anyone help?

    www.band-nation.co.uk

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi WiccaMan,

    I didn't download your site, so I have no idea what is in your *.js file. What I did learn, however, is that you do not have "document.all" within the main file -- and in all likelihood, no 'document.layers'. So...
    if (document.getElementById)
    ...ie5+ & nn6 code goes here...
    else if (document.all)
    ...ie 4+ code goes here
    else if (document.layers)
    ...nn4 code goes here...

    if (document.layers)
    {
    document.layers[layerID].document.open();
    document.layers[layerID].document.write(content2Display);
    document.layers[layerID].document.close();
    }

    elementby & all use '.style'; nn4 does not

    if you need more see the "dHTML: an Introduction" script/tutorial at my site (GrassBlade)

    BTW: you can place all of your javascript functions and declarations within one set of <script> tags. Having a set per function is a bit overkill, time consuming, and space wastage.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for taking the time to post that up for me Vinny. I'll get back here when I've had time to work on it. Cheers.

  4. #4
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Wiccaman,

    I do not pop up here as often as I used to. So...
    If you need a quick response, you can always find me at javascriptCity.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •