#1
  1. No Profile Picture
    The Sandman
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Ouderkerk, The Netherlands
    Posts
    46
    Rep Power
    13

    javascript:window.open()


    When I use the function javascript:window.open("http//.....") the page opens in a popup, but the main page changes to a page displaying the this:

    [object]

    How can I open this popup without changing the main page ?

    Thanx
    Did I confuse you? I never ment to throw sand in your eyes.

    The Sandman
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    That really doesn't make any sense to me. Have you got any more description/code of what you're doing otherwise I'll be continually baffled.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    That's the way the javascript: url is supposed to work; if it returns a value, that value becomes a new document, displayed in the window where the code is running. You can 'cancel' this return value with:

    javascript:void window.open("http//.....") ;

    A better approach - if you're calling this from a link:

    <a href="http//....." target="_blank" onclick="window.open('http//.....');return false;">OPEN</a>

    The return false; will cancel the link being followed. Non-JS enabled browsers will load the href in a new window. Be sure and use single quotes for any nested JS.
    Last edited by mrrichardfeder; January 15th, 2002 at 11:15 AM.

IMN logo majestic logo threadwatch logo seochat tools logo