Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Simple window.open Question

    This code is opening the url in a new window just as I want, but leaving the old window blank except for the message [object] in it.

    <a href="javascript:window.open('http://www.xxx.com')">Click Here to Open New Window</a>

    Thanks, Peter

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    625
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <a href="javascript:window.open('http://www.www.com');void(0);">Click Here to Open New Window</a>

    That just opens a default page...that being the case, why don't you just use a standard anchor...?

    Maybe, you can use this:


    http://www.ekigroup.com/javascript/winGen.html


    -james
    Last edited by jamescover; 07-07-2004 at 10:53 PM.
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I'm not sure what you're saying. Don't know what you mean by standard window... but I don't care about the dimensions. I just don't want it to open in MY window and replace my site.

    Elsewhere I use this code and it works fine:

    if (V==1222){window.open('http://www.xxx.com/')}

    But I want it to be in an href statement.

    (Of course the real url isn't xxx.)

    Thanks, Peter

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try searching this forum.
    There are hundreds of popup scripts and/or examples which show how to do what you are asking...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •