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

    Join Date
    May 2000
    Posts
    11
    Rep Power
    0
    Hi everybody,

    the following code does not work with Netscape 4.x:

    <map name="startMap">
    <area onClick="show1();" shape="rect" alt="show1" coords="680,2,760,30">
    <area onClick="show2();" shape="rect" alt="show1" coords="220,2,300,30">
    </map>

    <img src="../gfx/pb_start.jpg" usemap="#startMap" alt="press Start">

    When clicking on the specified area of the image, nothing happens. With IE5 though it works perfectly. Does anybody have a suggestion for that ?

    Thanks a lot !

    Andreas

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

    Join Date
    Oct 1999
    Posts
    84
    Rep Power
    15
    If you put your mouse on the image map and the hotspots are where you want them then the problem will be in the script. I cannot help any further without seeing the script where your show1() and show2() functions are defined.

    Spookster
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    11
    Rep Power
    0
    Hi Spookster,

    thanks for helping me. Here's the script.
    Show1 should test for the existance of nw and if nw does not exist, it should open a new window. (By the way, this does not work both with IE and Netscape).

    Show2 works on IE5 but not on Netscape. With Netscape nothing happens at all !.

    My guess is that I need to change my code where I try for the existance of nw (if(!document.nw)).
    Probably Netscape stops processing Javascript after an error occured whereas IE continues. I am not sure but this could be the solution, what do you think?

    Andreas

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    // submit form, open new window and show newspaper
    function show1()
    {
    document.newsJob.action='newspaper_frame.php';
    //document.newsJob.action='test_news.php';
    if(!(document.nw))
    {
    nw = window.open("","newsWindow","width=800,height=700,scrollbars=yes,resizable=yes,status=yes,location=y es,toolbar=yes");
    }
    document.newsJob.target='newsWindow';
    document.newsJob.submit();
    document.nw.focus();
    return true;
    }

    // submit form, open new window and show job list
    function show2()
    {
    document.newsJob.action='job_list_frame.php';
    //document.newsJob.action='test.php';
    document.newsJob.target='_top';
    document.newsJob.submit();
    return true;
    }
    -->
    </SCRIPT>
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Posts
    84
    Rep Power
    15
    I would try using the window.closed property instead.

    if(!nw.closed){
    do this if window is open
    }
    else{
    do this if window is closed
    }


    Spookster
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    81
    Rep Power
    14
    When running the script through my syntax/web browser compatibility checker, the only error I received was in your closing comment line. Change the --> to //--> at the end of your script.

    Russ


Similar Threads

  1. clipping a layer in netscape 6
    By kubus in forum HTML Programming
    Replies: 0
    Last Post: July 30th, 2003, 11:55 AM
  2. CSS Overflow problem with Mac
    By kobusn in forum CSS Help
    Replies: 0
    Last Post: October 3rd, 2002, 02:44 AM
  3. Replies: 1
    Last Post: May 14th, 2002, 07:43 PM
  4. Javascript 1.2 netscape problem
    By Mr.M in forum JavaScript Development
    Replies: 5
    Last Post: December 16th, 2001, 01:32 PM
  5. Problem: Netscape and <area onClick="...
    By andi in forum HTML Programming
    Replies: 1
    Last Post: June 13th, 2000, 01:07 AM

IMN logo majestic logo threadwatch logo seochat tools logo