Opening NEW popup windows

Discussion in 'JavaScript' started by Angadude, Jun 18, 2009.

  1. #1
    Hello all,
    I want to open new popup windows, and not have the same window change it's URL.
    Any way I could get this desired effect? Thanks a lot for your time :)
     
    Angadude, Jun 18, 2009 IP
  2. ToddMicheau

    ToddMicheau Active Member

    Messages:
    183
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    0.o

    . . .

    <a href="whereyouwantit.html" target="_blank" alt="This will open a new window">Is this what you were talking about?</a>

    Or-

    <a href=javascript:window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200,toolbar=yes,
    location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,
    resizable=yes') alt="New window with javascript">asfd</a>
     
    ToddMicheau, Jun 18, 2009 IP
  3. mangesh85

    mangesh85 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Its easy to open a new pop-up window

    <A HREF="javascript:void(0)" onclick="window.open('welcome.html','welcome','width=300,height=200')">Open a new window</A>
     
    mangesh85, Jun 20, 2009 IP
  4. Angadude

    Angadude Peon

    Messages:
    250
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    @Todd, and Mangesh: I shall check both your codes up, thanks so much for your time!

    @Todd: Your first code DOES look like its what I need.

    Consider the scenario that a popup by my website is already open. Now when the user clicks another link that shows content in a popup(made by a JS function), I want it to open in another popup, not the earlier popup's window.
     
    Angadude, Jun 20, 2009 IP
  5. JavaScriptBank.com

    JavaScriptBank.com Peon

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    target="_blank" is the best choice in your case
     
    JavaScriptBank.com, Jun 23, 2009 IP
  6. Angadude

    Angadude Peon

    Messages:
    250
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ah thank you :) I needed this on my online radio website!
     
    Angadude, Jul 3, 2009 IP
  7. Angadude

    Angadude Peon

    Messages:
    250
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Oops that just opens blank windows.

    Anyway, here is a solution to all using JS, and wanting to open the popup in NEW windows. Pass NEW WINDOW NAME parameters to each window link :)

    Sorry for double posting I couldn't find a edit button.
     
    Angadude, Jul 3, 2009 IP