Opening a new window

Discussion in 'HTML' started by Martin, Jul 12, 2004.

  1. Martin

    Martin Guest

    I'm creating a page that contains several VML elements. i want to make
    it so that when the user clicks on a VML item, a separate window will
    pop up to display some information (a separate page will be served).

    I know how to use "window.open" in an "onClick" event to open a new
    window and specify various factors (width, height, scrollbars, etc.).
    The problem is, the VML elements do not have an onClick event. What
    they DO have is "href" and "target". Using these, I can get the
    separate window to appear and display the page - but, I can't figure
    out how to control the appearence of the new window (width, height,
    scrollbars, etc.).

    Is there a way to specify these parameters?

    Or, alternatively, is there some way I could set these by running an
    "onLoad=" script in the new window?

    Suggestions?

    Thanks.
     
    Martin, Jul 12, 2004
    #1
    1. Advertising

  2. Martin

    Webcastmaker Guest

    In article <>,
    says...
    > I'm creating a page that contains several VML elements. i want to make
    > it so that when the user clicks on a VML item, a separate window will
    > pop up to display some information (a separate page will be served).


    Prepare for the wrath of pop-up window haters.... ;-}

    > I know how to use "window.open"...

    <snip>

    > Is there a way to specify these parameters?


    Use target="_blank" in your link. Then the page that it opens have
    the following:

    var Holder = window.open('page.html','name','options');
    window.opener = null;
    self.close();

    This will launch the new sized window and close the one opened with
    target="_blank". It will also re-use the sized window every time so
    the user does not have a million of these opened. An example of this
    can be seen on all of our demos.

    --
    WebcastMaker
    The easiest and most affordable way to create
    Web casts, or put presentations on the Web.
    www.webentations.com
     
    Webcastmaker, Jul 12, 2004
    #2
    1. Advertising

  3. Martin

    Dylan Parry Guest

    Webcastmaker wrote:

    > This will launch the new sized window and close the one opened with
    > target="_blank".


    Does this not bring up a dialogue in IE saying something about a
    JavaScript trying to close a Window that wasn't opened with JavaScript?

    --
    Dylan Parry
    http://www.webpageworkshop.co.uk - FREE Web tutorials and references

    Now playing: Yes - The Gates Of Delirium [live][Symphonic Tour]
     
    Dylan Parry, Jul 12, 2004
    #3
  4. Martin

    Webcastmaker Guest

    In article <>,
    says...
    > Webcastmaker wrote:
    >
    > > This will launch the new sized window and close the one opened with
    > > target="_blank".

    >
    > Does this not bring up a dialogue in IE saying something about a
    > JavaScript trying to close a Window that wasn't opened with JavaScript?


    Nope, try it one of the demos and see.

    --
    WebcastMaker
    The easiest and most affordable way to create
    Web casts, or put presentations on the Web.
    www.webentations.com
     
    Webcastmaker, Jul 12, 2004
    #4
  5. Martin

    Dylan Parry Guest

    Webcastmaker wrote:

    >> Does this not bring up a dialogue in IE saying something about a
    >> JavaScript trying to close a Window that wasn't opened with JavaScript?

    >
    > Nope, try it one of the demos and see.


    Heh, if I could try it then I wouldn't have asked ;) Linux doesn't have an
    Internet Explorer :)

    --
    Dylan Parry
    http://www.webpageworkshop.co.uk - FREE Web tutorials and references

    Now playing: Yes - The Gates Of Delirium [live][Symphonic Tour]
     
    Dylan Parry, Jul 12, 2004
    #5
  6. Martin

    Martin Guest

    OK, thanks - that worked as you it would.

    Would you happen to know if there's some way to keep the "_blank"
    window hidden such that it does not become visible at all? Maybe
    "pop-under"?

    Thanks again.



    On Mon, 12 Jul 2004 15:21:12 -0400, Webcastmaker
    <> wrote:

    >In article <>,
    > says...
    >> I'm creating a page that contains several VML elements. i want to make
    >> it so that when the user clicks on a VML item, a separate window will
    >> pop up to display some information (a separate page will be served).

    >
    >Prepare for the wrath of pop-up window haters.... ;-}
    >
    >> I know how to use "window.open"...

    ><snip>
    >
    >> Is there a way to specify these parameters?

    >
    >Use target="_blank" in your link. Then the page that it opens have
    >the following:
    >
    >var Holder = window.open('page.html','name','options');
    > window.opener = null;
    > self.close();
    >
    >This will launch the new sized window and close the one opened with
    >target="_blank". It will also re-use the sized window every time so
    >the user does not have a million of these opened. An example of this
    >can be seen on all of our demos.
     
    Martin, Jul 12, 2004
    #6
  7. Martin

    Webcastmaker Guest

    In article <>,
    says...
    > OK, thanks - that worked as you it would.
    > Would you happen to know if there's some way to keep the "_blank"
    > window hidden such that it does not become visible at all? Maybe
    > "pop-under"?


    Nope not that I know of. We have not seen that momentary window an
    issue as it is appearing to the user that the Pop-up is simply
    resizing itself. But then, our reason to use it is a web
    application, rather than a pop up with a website in it.


    --
    WebcastMaker
    The easiest and most affordable way to create
    Web casts, or put presentations on the Web.
    www.webentations.com
     
    Webcastmaker, Jul 13, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick Olurotimi Ige

    Closing child window when opening a new Window

    Patrick Olurotimi Ige, Dec 14, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    446
    Patrick Olurotimi Ige
    Dec 14, 2004
  2. POL8985
    Replies:
    1
    Views:
    554
    Kevin Spencer
    Jan 31, 2005
  3. UJ
    Replies:
    2
    Views:
    7,517
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  4. Clara
    Replies:
    6
    Views:
    590
    Clara
    Apr 25, 2005
  5. Allan
    Replies:
    1
    Views:
    115
    Randy Webb
    Aug 6, 2004
Loading...

Share This Page