Opening links in new window

Discussion in 'HTML' started by BernieH, Nov 25, 2004.

  1. BernieH

    BernieH Guest

    I'm trying to get the links in the following dropdown list to open up in a
    new window when the Go button is pressed. At the moment they open up in the
    same window. Can anybody help?

    <form name="quicklinks">
    <select name="links">
    <option value=" ">--Select--</option>
    <option value="examples.htm">Examples</option>
    <option value="main.htm">Main</option>
    <option value="http://www.google.com">Test</option>
    </select>
    <input type="button" name="go" value="Go!"
    onClick="window.location=document.quicklinks.links.options[document.quicklinks.links.selectedIndex].value">
    </form>

    TIA

    BernieH
    BernieH, Nov 25, 2004
    #1
    1. Advertising

  2. BernieH

    Mark Parnell Guest

    Previously in alt.html, BernieH <> said:

    > I'm trying to get the links in the following dropdown list to open up in a
    > new window when the Go button is pressed. At the moment they open up in the
    > same window. Can anybody help?


    Check the documentation for your browser.

    What's that? Oh, you want it to do that in *my* browser? Tough. It's my
    browser, not yours.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Nov 25, 2004
    #2
    1. Advertising

  3. BernieH

    Adrienne Guest

    Gazing into my crystal ball I observed "BernieH"
    <> writing in
    news:fpdpd.197$:

    > I'm trying to get the links in the following dropdown list to open up
    > in a new window when the Go button is pressed. At the moment they open
    > up in the same window. Can anybody help?
    >
    ><form name="quicklinks">
    ><select name="links">
    ><option value=" ">--Select--</option>
    ><option value="examples.htm">Examples</option>
    ><option value="main.htm">Main</option>
    ><option value="http://www.google.com">Test</option> </select> <input
    > type="button" name="go" value="Go!"
    > onClick="window.location=document.quicklinks.links.options[document.quic
    > k links.links.selectedIndex].value"> </form>
    >
    > TIA
    >


    There are a lot of things wrong with what you want to do.

    1. If a user has javascript disabled, or does not have javascript, they
    will not be able to navigate. That would include search engine bots, like
    Google.

    2. Opening new windows is a Bad Idea. It breaks the Back Button and can
    confuse visitors, sometimes enough they never come back.

    3. Using this sort of widget for navigation is also bad because the user
    has to scroll to see the choices. A nicely styled navigation menu using UL
    and LI elements is a much better choice.

    --
    Adrienne Boswell
    Please respond to the group so others can share
    Adrienne, Nov 25, 2004
    #3
  4. In article <fpdpd.197$>, "BernieH"
    <> wrote:

    > I'm trying to get the links in the following dropdown list to open up in a
    > new window when the Go button is pressed.


    Don't. As a user, I hate popups with a passion. Perhaps, I'm in the
    minority with that attitude but I doubt it. Didn't expect it. Don't want
    it. Don't like it. Extraneous crap on my screen. Can't use the back
    button. Hate your site.

    leo

    --
    <http://web0.greatbasin.net/~leo/>
    Leonard Blaisdell, Nov 25, 2004
    #4
  5. BernieH

    BernieH Guest

    Thanks for all input so far. The site is an intranet which uses frames.
    Sites within the home domain will open up within the frame; but for outside
    sites we really need to open a new window; not popups. JavaScript will not
    be a problem since JavaScript is enabled by default on all computers which
    will use the intranet.

    Hoping this clarifies things :)

    BernieH
    "BernieH" <> wrote in message
    news:fpdpd.197$...
    > I'm trying to get the links in the following dropdown list to open up in a
    > new window when the Go button is pressed. At the moment they open up in
    > the same window. Can anybody help?
    >
    > <form name="quicklinks">
    > <select name="links">
    > <option value=" ">--Select--</option>
    > <option value="examples.htm">Examples</option>
    > <option value="main.htm">Main</option>
    > <option value="http://www.google.com">Test</option>
    > </select>
    > <input type="button" name="go" value="Go!"
    > onClick="window.location=document.quicklinks.links.options[document.quicklinks.links.selectedIndex].value">
    > </form>
    >
    > TIA
    >
    > BernieH
    >
    BernieH, Nov 25, 2004
    #5
  6. BernieH

    rf Guest

    BernieH wrote

    > really need to open a new window; not popups


    A popup *is* a new window.

    However, if this is not for the internet at large (a fact you *should* have
    mentioned in your op) then window.open is the function you are looking for.

    Google for "window.open". The very first hit is microsofts documentation on
    this function. There are even examples.

    --
    Cheers
    Richard.
    rf, Nov 25, 2004
    #6
  7. BernieH

    Henry Guest

    BernieH wrote:
    > Thanks for all input so far. The site is an intranet which uses frames.
    > Sites within the home domain will open up within the frame; but for outside
    > sites we really need to open a new window; not popups. JavaScript will not
    > be a problem since JavaScript is enabled by default on all computers which
    > will use the intranet.
    >
    > Hoping this clarifies things :)



    Try...

    <p><a target="_blank" href="top.htm">link</a></p>


    Despite some objections here, many people love it! Including myself.

    You don't have to press back button and use a bandwidth.

    Because you see both arrows gray, you know that is a new window and to
    go back to your page, user have to simply close that page and that way
    is quicker than reload the page.

    Of course users can press RMB on the link and select -"Open the link in
    new window" but... how many users are that smart?

    ;)
    Henry, Nov 25, 2004
    #7
  8. Henry wrote:
    > <p><a target="_blank" href="top.htm">link</a></p>
    >
    > Despite some objections here, many people love it! Including myself.


    Great, so middle-click the link and get what you love. People who have
    different preferences can left-click the link; no one forces anything on
    anyone, everyone wins.

    > You don't have to press back button and use a bandwidth.


    Many browsers will use their cache to load pages after a back-button
    click, so no extra bandwidth will be used.

    > Because you see both arrows gray, you know that is a new window and to
    > go back to your page, user have to simply close that page and that way
    > is quicker than reload the page.
    >
    > Of course users can press RMB on the link and select -"Open the link in
    > new window" but... how many users are that smart?


    You really expect users who don't know how to open a new window on their
    own to know how to close one? My mother -- better at using a computer
    than most, by the way -- has had to have me explain why her back button
    has broken many, many times.
    Leif K-Brooks, Nov 25, 2004
    #8
  9. BernieH

    DU Guest

    BernieH wrote:
    > Thanks for all input so far. The site is an intranet which uses frames.


    It would have been nice to say all this in your initial post.

    > Sites within the home domain will open up within the frame;


    then use the target attribute.

    but for outside
    > sites we really need to open a new window; not popups.


    A popup is a new window.

    JavaScript will not
    > be a problem since JavaScript is enabled by default on all computers which
    > will use the intranet.
    >


    The arguments of other posters still are valid ones.

    > Hoping this clarifies things :)
    >
    > BernieH


    Yes but you could clarify the contextual reading of your post by
    avoiding top-posting.

    DU
    --
    The site said to use Internet Explorer 5 or better... so I switched to
    Mozilla 1.7.3 :)

    > "BernieH" <> wrote in message
    > news:fpdpd.197$...
    >
    >>I'm trying to get the links in the following dropdown list to open up in a
    >>new window when the Go button is pressed. At the moment they open up in
    >>the same window. Can anybody help?
    >>
    >><form name="quicklinks">
    >><select name="links">
    >><option value=" ">--Select--</option>
    >><option value="examples.htm">Examples</option>
    >><option value="main.htm">Main</option>
    >><option value="http://www.google.com">Test</option>
    >></select>
    >><input type="button" name="go" value="Go!"
    >>onClick="window.location=document.quicklinks.links.options[document.quicklinks.links.selectedIndex].value">
    >></form>
    >>
    >>TIA
    >>
    >>BernieH
    >>

    >
    >
    >
    DU, Nov 25, 2004
    #9
  10. BernieH

    Karl Core Guest

    "BernieH" <> wrote in message
    news:fpdpd.197$...
    > I'm trying to get the links in the following dropdown list to open up in a
    > new window when the Go button is pressed. At the moment they open up in
    > the same window. Can anybody help?
    >
    > <form name="quicklinks">
    > <select name="links">
    > <option value=" ">--Select--</option>
    > <option value="examples.htm">Examples</option>
    > <option value="main.htm">Main</option>
    > <option value="http://www.google.com">Test</option>
    > </select>
    > <input type="button" name="go" value="Go!"
    > onClick="window.location=document.quicklinks.links.options[document.quicklinks.links.selectedIndex].value">
    > </form>
    >
    > TIA
    >
    > BernieH
    >


    Dropdowns suck
    Opening shit in a new window sucks
    http://karlcore.com/articles/article.php?id=25


    --
    -Karl Core
    Please Support "Project Boneyard":
    http://www.insurgence.net/info.aspx?action=band&item=boneyard
    Karl Core, Nov 26, 2004
    #10
  11. BernieH

    Henry Guest

    Karl Core wrote:

    > Dropdowns suck
    > Opening shit in a new window sucks
    > http://karlcore.com/articles/article.php?id=25



    I have to admit that you are absolutely right Karl.
    It's unbelievable how many people could have problem with new window.
    Sometimes I think that is doesn't matter how easy could be a new task to
    learn, the most people will still refuse to learn it anyway.

    Good one... treat users as total idiots and provide for them a
    functionality they will be able understand.

    But that means... if most people will not change to FF or Opera, how
    long we will have to endure IE and Windoze??????


    :(
    Henry, Nov 26, 2004
    #11
  12. BernieH

    Guest

    On Thu, 25 Nov 2004 17:02:35 +0800, Henry <>
    wrote:

    >BernieH wrote:
    >> Thanks for all input so far. The site is an intranet which uses frames.
    >> Sites within the home domain will open up within the frame; but for outside
    >> sites we really need to open a new window; not popups. JavaScript will not
    >> be a problem since JavaScript is enabled by default on all computers which
    >> will use the intranet.
    >>
    >> Hoping this clarifies things :)

    >
    >
    >Try...
    >
    ><p><a target="_blank" href="top.htm">link</a></p>


    The key portion of the above is the target="_blank" as stated above.
    I'm in the same position as you. I have frames and for some windows I
    want to open a new window, while in others I want to open it in the
    same window.

    --
    Erik
    , Dec 1, 2004
    #12
  13. BernieH

    Mark Parnell Guest

    Previously in alt.html, "" <>
    said:

    > I'm in the same position as you. I have frames and for some windows I


    http://www.htmlhelp.com/design/frames/whatswrong.html
    http://html-faq.com/htmlframes/?framesareevil
    http://dorward.me.uk/www/frames/
    http://www.google.com/webmasters/2.html (see under "Your page uses
    frames")
    http://www.markparnell.com.au/articles/frames.php

    > want to open a new window, while in others I want to open it in the
    > same window.


    Sigh. It's not about what *you* want. It's about what your *users* want.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Dec 1, 2004
    #13
    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:
    426
    Patrick Olurotimi Ige
    Dec 14, 2004
  2. UJ
    Replies:
    2
    Views:
    7,486
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  3. steve
    Replies:
    10
    Views:
    672
  4. metalive
    Replies:
    3
    Views:
    1,140
    Andy Dingley
    Jul 17, 2005
  5. Clara
    Replies:
    6
    Views:
    572
    Clara
    Apr 25, 2005
Loading...

Share This Page