Using an already open window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sugapablo

    Using an already open window

    Ok, in one line I have the following:
    <a href="#"
    onclick="window .open('http://somesite.com',' bigwin','width= 600,height=400' );">Link</a>

    Once that window is open, I want to send more urls to that exiting
    window. How do I do that?

    I tried: bigwin.location .href="" but to no avail.


    --
    [ Sugapablo ]
    [ http://www.sugapablo.com <--music ]
    [ http://www.sugapablo.net <--personal ]
    [ sugapablo@12jab ber.com <--jabber IM ]

  • Michael Winter

    #2
    Re: Using an already open window

    "Sugapablo" wrote on 11/11/2003:
    [color=blue]
    > Ok, in one line I have the following:
    > <a href="#"
    >[/color]
    onclick="window .open('http://somesite.com',' bigwin','width= 600,height=
    400');">Link</a>[color=blue]
    >
    > Once that window is open, I want to send more urls to that exiting
    > window. How do I do that?
    >
    > I tried: bigwin.location .href="" but to no avail.[/color]

    The name you specify in the window.open method is used by the 'target'
    attribute in an A element. If you want to use JavaScript, save the
    return value from the window.open method. That represents the window
    object for the pop-up:

    var bigwin = window.open( URL, name, options );

    <A href="new URL" target="name">. ..</A>

    or

    <A href="#" onclick="bigwin .location.href= 'new URL'">...</A>

    The 'target' attribute is depreciated for strict HTML pages, so on
    that basis, the second method is better.

    Mike

    --
    Michael Winter
    M.Winter@[no-spam]blueyonder.co.u k (remove [no-spam] to reply)


    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Using an already open window

      Michael Winter wrote:
      [color=blue]
      > If you want to use JavaScript, save the return value from the window.open
      > method. That represents the window object for the pop-up:[/color]

      The return value is a reference to the (new) Window object.


      PointedEars

      Comment

      Working...