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

    Join Date
    Oct 2001
    Posts
    30
    Rep Power
    13

    Javascript in Netscape 4.7 not working


    I have a window that pops up using the following code:

    ============

    <head>
    ...

    function watch_display(){
    window.open('watch_display.html', '', 'width=500,height=370')
    }
    ...
    </head>

    <body>
    ...
    <a href="JavaScript: void watch_display()">Click here to Browse the Watches!</a></p>
    ...
    </body>

    ============

    Once they are in this view, I want users to be able to click on another link within watch_display.html and open another Pop-up window with a picture and info about the watch. Currently I am using the code below within watch_display to accomplish this task.

    ============
    <head>
    ...

    function p_sdr101(){
    window.open('p_sdr101.html', '', 'width=320,height=420')
    }
    ...
    </head>

    <body>
    ...
    <a href="JavaScript: void p_sdr101()">launch pop-up</a>
    ...
    </body>
    ============

    In Explorer, it works fine. However, in Netscape 4.7, it pulls up the detail page in the same window. Can anyone help me figure out how to make this work correctly?

    Thanks,
    designdawg
    designdawg
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    Add a name to your popup code.

    Code:
    function watch_display(){
    window.open('watch_display.html', 'popup1', 'width=500,height=370')
    }
    Code:
    function p_sdr101(){
    window.open('p_sdr101.html', 'popup2', 'width=320,height=420')
    }
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    30
    Rep Power
    13
    WOW! All I did was name the first pop-up watch_display.html. Everything else just took care of itself. I really appreciate it. If you have a moment, could you let me know why that worked?

    If not, I completely understand!

    Thanks,
    designdawg
    designdawg
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    In your code you had the Name/Target blank. This means that it will open in the same window.

    window.open('p_sdr101.html', '', 'width=320,height=420')


    You need to differenciate the windows by having different names.
    window.open('p_sdr101.html', 'popup2', 'width=320,height=420')
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    30
    Rep Power
    13
    I get it now. Thanks again!

    designdawg
    designdawg

IMN logo majestic logo threadwatch logo seochat tools logo