Open new browser - multiple links per page - how?

Discussion in 'Javascript' started by Geoff Fox, Jul 6, 2006.

  1. Geoff Fox

    Geoff Fox Guest

    I am in the final moments of designing a new website. One of the pages
    (http://www.auditionfactory.com/samples.php) has four links to show
    sample work. I would like these links to open new browser windows when
    clicked. I have found scripts that will allow one to open, and a few
    that claim to all multiples to be opened, but so far nothing that will
    allow a user to open multiple new windows as they click to see new
    samples.

    Does anyone know of a way to accomplish this.

    Thanks,
    Geoff Fox
    Connecticut
    USA
     
    Geoff Fox, Jul 6, 2006
    #1
    1. Advertising

  2. Geoff Fox

    mertas Guest

    Geoff Fox wrote:
    > I am in the final moments of designing a new website. One of the pages
    > (http://www.auditionfactory.com/samples.php) has four links to show
    > sample work. I would like these links to open new browser windows when
    > clicked. I have found scripts that will allow one to open, and a few
    > that claim to all multiples to be opened, but so far nothing that will
    > allow a user to open multiple new windows as they click to see new
    > samples.
    >
    > Does anyone know of a way to accomplish this.
    >
    > Thanks,
    > Geoff Fox
    > Connecticut
    > USA



    <a href="http://www.tonyterzi.com" target=_blank>Tony Terzi</a>
    try this...
     
    mertas, Jul 6, 2006
    #2
    1. Advertising

  3. Geoff Fox

    Jungleman Guest

    target=_blank>

    I think this just opens the page in the existing browser window. In any
    case "target" has been deprecated so the code might not validate. Hence
    the need to use Javascript, right?


    mertas wrote:
    > Geoff Fox wrote:
    > > I am in the final moments of designing a new website. One of the pages
    > > (http://www.auditionfactory.com/samples.php) has four links to show
    > > sample work. I would like these links to open new browser windows when
    > > clicked. I have found scripts that will allow one to open, and a few
    > > that claim to all multiples to be opened, but so far nothing that will
    > > allow a user to open multiple new windows as they click to see new
    > > samples.
    > >
    > > Does anyone know of a way to accomplish this.
    > >
    > > Thanks,
    > > Geoff Fox
    > > Connecticut
    > > USA

    >
    >
    > <a href="http://www.tonyterzi.com" target=_blank>Tony Terzi</a>
    > try this...
     
    Jungleman, Jul 6, 2006
    #3
  4. Geoff Fox

    Geoff Fox Guest

    Yes, that's my understanding. It's got to be in Javascript.

    The many Javascript solutions I've found only work for one new browser
    window being spawned. So, if you click on one link, you can't click on
    the others until that first link's 'new' browser is closed.

    I'm still searching for a solution. Any help gratefully appreciated.

    All the best,
    Geoff Fox
     
    Geoff Fox, Jul 6, 2006
    #4
  5. Geoff Fox

    Evertjan. Guest

    Geoff Fox wrote on 06 jul 2006 in comp.lang.javascript:

    > Yes, that's my understanding. It's got to be in Javascript.


    Please quote what you are replying to. If you want to post a followup via
    groups.google.com, don't use the "Reply" link at the bottom of the article.
    Click on "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers.
    <http://www.safalra.com/special/googlegroupsreply/>

    >
    > The many Javascript solutions I've found only work for one new browser
    > window being spawned. So, if you click on one link, you can't click on
    > the others until that first link's 'new' browser is closed.


    <div
    onclick=
    'window.open("a.html","_blank","");'+
    'window.open("b.html","_blank","");'+
    'window.open("c.html","_blank","");'+
    'window.open("d.html","_blank","");'+
    'window.open("e.html","_blank","");'>
    Open 5 new windows by one click here
    </div>

    not tested

    > I'm still searching for a solution. Any help gratefully appreciated.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jul 6, 2006
    #5
  6. Geoff Fox

    Randy Webb Guest

    Evertjan. said the following on 7/6/2006 4:07 PM:
    > Geoff Fox wrote on 06 jul 2006 in comp.lang.javascript:


    <snip>

    >> The many Javascript solutions I've found only work for one new browser
    >> window being spawned. So, if you click on one link, you can't click on
    >> the others until that first link's 'new' browser is closed.

    >
    > <div
    > onclick=
    > 'window.open("a.html","_blank","");'+
    > 'window.open("b.html","_blank","");'+
    > 'window.open("c.html","_blank","");'+
    > 'window.open("d.html","_blank","");'+
    > 'window.open("e.html","_blank","");'>
    > Open 5 new windows by one click here
    > </div>
    >
    > not tested


    The + doesn't work in that code the way you think it would in anything
    but IE.

    Tested:

    <div id="test" onclick='
    window.open("a.html","_blank","");
    window.open("b.html","_blank","");
    window.open("c.html","_blank","");
    window.open("d.html","_blank","");
    window.open("e.html","_blank","");
    '>
    Open 5 new windows by one click here
    </div>

    IE: 5 new windows
    FF: 5 new windows
    Opera 9: 1 new window with 4 popups blocked.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Jul 6, 2006
    #6
  7. Geoff Fox

    Geoff Fox Guest

    Thanks all. I appreciate the help, but this wasn't exactly what I
    wanted to do. I apologize if I've described my problem incorrectly.

    I want to be able to open new windows, one at a time, as my visitors
    click individual links. In the Javascript I've tried, once the first
    new window is open, no other new windows can be spawned. You have to
    close the first spawned window, which is now hidden under the active
    window you're trying to click on.


    In all the solutions I've tried,
    Randy Webb wrote:
    > Evertjan. said the following on 7/6/2006 4:07 PM:
    > > Geoff Fox wrote on 06 jul 2006 in comp.lang.javascript:

    >
    > <snip>
    >
    > >> The many Javascript solutions I've found only work for one new browser
    > >> window being spawned. So, if you click on one link, you can't click on
    > >> the others until that first link's 'new' browser is closed.

    > >
    > > <div
    > > onclick=
    > > 'window.open("a.html","_blank","");'+
    > > 'window.open("b.html","_blank","");'+
    > > 'window.open("c.html","_blank","");'+
    > > 'window.open("d.html","_blank","");'+
    > > 'window.open("e.html","_blank","");'>
    > > Open 5 new windows by one click here
    > > </div>
    > >
    > > not tested

    >
    > The + doesn't work in that code the way you think it would in anything
    > but IE.
    >
    > Tested:
    >
    > <div id="test" onclick='
    > window.open("a.html","_blank","");
    > window.open("b.html","_blank","");
    > window.open("c.html","_blank","");
    > window.open("d.html","_blank","");
    > window.open("e.html","_blank","");
    > '>
    > Open 5 new windows by one click here
    > </div>
    >
    > IE: 5 new windows
    > FF: 5 new windows
    > Opera 9: 1 new window with 4 popups blocked.
    >
    > --
    > Randy
    > comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    > Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
    > Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Geoff Fox, Jul 6, 2006
    #7
  8. "Jungleman" <> writes:

    > target=_blank>
    >
    > I think this just opens the page in the existing browser window.


    That depends on the browser. In a tabbed browser, it most likely
    opens a new tab. In, e.g., IE, it opens a new window.
    Whether that counts as a "new browser", I'll leave for the philosophers
    (I guess the best test of whether it's a new browser or a new window
    in the same browser is to crash one and see if it takes the other one
    down with it :).

    > In any case "target" has been deprecated so the code might not
    > validate.


    It's not deprecated. It's a standard feature of HTML 4.01
    Transitional, and any document using the appropriate DOCTYPE
    should have no problem validating.

    > Hence the need to use Javascript, right?


    I would question the need for a new window first. After that,
    I'll question a design that requires Javascript.

    /L
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Jul 7, 2006
    #8
  9. Geoff Fox

    Dougeez Guest

    On 6 Jul 2006 10:43:24 -0700, Geoff Fox wrote...
    >
    >I am in the final moments of designing a new website. One of the pages
    >(http://www.auditionfactory.com/samples.php) has four links to show
    >sample work. I would like these links to open new browser windows when
    >clicked. I have found scripts that will allow one to open, and a few
    >that claim to all multiples to be opened, but so far nothing that will
    >allow a user to open multiple new windows as they click to see new
    >samples.
    >
    >Does anyone know of a way to accomplish this.
    >
    >Thanks,
    >Geoff Fox
    >Connecticut
    >USA
    >



    If you use this, I believe it uses a new window for all the link on the page,
    without having to define the "target" for each...


    <head>
    <base target="_blank">
    </head>

    Hope it's helpful.

    Dougeez


    --
    Newsguy.Com
    Basic Account - $39.95 / year
    http://newsguy.com/overview.htm
     
    Dougeez, Jul 7, 2006
    #9
    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. =?Utf-8?B?S01aX3N0YXRl?=

    Quick one - Is SESSION per browser instance or per IP Address?

    =?Utf-8?B?S01aX3N0YXRl?=, Apr 4, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    5,909
    gerry
    Apr 10, 2006
  2. Razvan
    Replies:
    1
    Views:
    422
    tony vee
    Sep 10, 2004
  3. Replies:
    5
    Views:
    2,587
  4. Replies:
    0
    Views:
    355
  5. chris brat
    Replies:
    1
    Views:
    651
    chris brat
    May 10, 2006
Loading...

Share This Page