Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Launch new window

    Hopefully an easy one. I'm wanting to imbed URLs in a document - but have the browser open the link in a new browser window.
    Is this possible to set?

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launch new window

    What kind of document?

    To force URLs to open in a new window, include the target="_blank" attribute in the hyperlink code, thus:<pre>Your Link Here</pre>

    -Mark

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Launch new window

    Mark's suggestion is standard HTML. Many people use JavaScript's window.open() method so that they can control size, existence of toolbars, etc. I believe the JavaScript windows are the ones that pop-up blockers target, so unless you need those features, the standard HTML approach usually is the least trouble for everyone involved.

  4. #4
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launch new window

    Mark

    Thanks - I'll give it a try.

    What kind of document? - a whole mix Frontpage HTML, Notepad HTML, Word HTML.
    I'm attempting to make my Intranet become the source of access to my file system drives in a themed way. The downside of a simple File: reference is that it opens in the same window, and people (me included) tend to lose the plot and exit when finished with the single document. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launch new window

    OK, gotcha. I wanted to make sure it was a document type that would allow you to tweak the underlying code.

    If you want to set this behaviour as the default, add the following line to the <HEAD> section of your HTML documents:<pre><base target="_blank"></pre>

    Also take note of Jefferson's point that this is standard HTML, and you can use Javascript to open a new window with more control over its size and appearance.

    Hope that helps,
    -Mark

Posting Permissions

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