#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    sf
    Posts
    2
    Rep Power
    0

    Netscape is killing me...


    hey,

    it's actually my very first script. It works in IE, but not in NS.

    here's the link to the page where i test it - http://www.flowersofthevalley.com/mi...andupdated.php

    it should work like this -
    when you click on the city, it highlightes it, and adds submenu.
    when click another city, it closes the previous one, and opens two new pictures.

    again, it works in IE...
    Maybe some problems with syntaxis or NS doesn't support something that is written.

    I'm actually a designer, not a programmer... and it's all so strange to me.

    the final look of the page is here - http://www.flowersofthevalley.com/miss/index.php

    if interesting

    thank you.

    p.s.

    the code = view source
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    New Jersey
    Posts
    100
    Rep Power
    12
    In your web page, click on your link. Then in the address window type:

    javascript:


    Netscape will list your errors.

    Generally speaking, even if you have errors Internet Explorer will figure out what you're trying to display and display your web page. Netscape expects everything to be perfect.

    Robin
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    NE Pa.
    Posts
    96
    Rep Power
    13
    BTW, please note this is a JAVA servlet / JSP section......NOT javascript...that goes in the html / javascript section & to be very honest it annoys the daylights out of Java programmers.... Sorry just had to vent!
    DC Dalton
    DCD Designs
    SCJP
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    New Jersey
    Posts
    100
    Rep Power
    12
    Arseni,

    I went to

    http://www.flowersofthevalley.com/miss/index.php

    using Netscape 6, clicked on your links, and typed

    javascript:
    in address window.

    I got the following errors

    Bay Area Button

    Error: daLast is not defined
    Source File: http://www.flowersofthevalley.com/miss/index.php
    Line: 109

    *************************
    Sacramento Button

    Error: daLast is not defined
    Source File: http://www.flowersofthevalley.com/miss/index.php
    Line: 94
    ************************
    The fact that you keep your JavaScript files separate from your JSP page makes no difference. They work together as one unit.

    Robin
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    sf
    Posts
    2
    Rep Power
    0
    The problem is that I use <div> to create layers, and netscape doesn't support div. Is there a way to tell netscape to change the source of the image in the div layer? Or should I create a separate page optimized for netscape?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    New Jersey
    Posts
    100
    Rep Power
    12
    Arseni,

    The code below was created in Dreamweaver MX (the latest version). It has <div> tags and it works in Netscape 4.7 and Netscape 6. It should also work in later versions of Netscape. There must be another reason your code doesn't work.

    http://www.robinsnest-webdesigns.com...s_welcome.html

    You can view the source code in:

    http://www.robinsnest-webdesigns.com...ds_welcome.txt

    Robin
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    1
    Rep Power
    0
    Quite a common problem, actually, with a very simple solution.

    Your JavaScript performs two checks in the menuItem_* functions:
    1. if (document.layers)
    2. else if (document.all)

    The first is NN4 code, the second is IE4+ code. Problem is, neither is W3C's DOM code. You need one more set of if statements:
    3. else if (document.getElementById)

    and each of your document.all statements should transform to:
    document.getElementById(lastItem).style.display='none' (use 'block', 'inline' or '' for 'visible')


    That should do the trick. See also the W3C's DOM site at http://www.w3c.org/DOM/

IMN logo majestic logo threadwatch logo seochat tools logo