#1
  1. Cobol Victim
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    Munich, GER
    Posts
    124
    Rep Power
    12

    problem with javascript link


    hi
    i'm doing something like:
    <A href='javascript:window.open("img/broken_hand.jpg","xZoom","toolbars=no")'>Zoom Image</A>
    it works fine, window opens etc, but it writes '[object]' into the current frame.
    Since i'm outputting this dynamically i cant add a 'target' attribute to the <a>
    how can i prevent the win.open function from returning anything

    thx in advance
    Lebowski: Isn't that what makes a man?
    Dude: Mmm, sure. That and a pair of testicles.
  2. #2
  3. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    You can't - it's designed to return the new window object (needed for programming) - but you can nuke it:

    <a href="javascript&#58;void window.open(...
  4. #3
  5. Cobol Victim
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    Munich, GER
    Posts
    124
    Rep Power
    12
    i didn't know void is also available in javaScript

    it saved me a lot of work

    thanks
    Lebowski: Isn't that what makes a man?
    Dude: Mmm, sure. That and a pair of testicles.

IMN logo majestic logo threadwatch logo seochat tools logo