Query re new window

Discussion in 'HTML' started by thedarkman, Nov 26, 2011.

  1. thedarkman

    thedarkman Guest

    On my websites, when I click on a link, I am transferred to a new
    page.

    It is also possible to open the new page but keep the old one open.

    Is there a code you can put in the root directory, a bit like
    robots.txt to alter this?

    Thanks
     
    thedarkman, Nov 26, 2011
    #1
    1. Advertising

  2. thedarkman

    Doug Miller Guest

    On 11/26/2011 11:50 AM, thedarkman wrote:
    >
    >
    > On my websites, when I click on a link, I am transferred to a new
    > page.
    >
    > It is also possible to open the new page but keep the old one open.
    >
    > Is there a code you can put in the root directory, a bit like
    > robots.txt to alter this?


    No.
     
    Doug Miller, Nov 26, 2011
    #2
    1. Advertising

  3. thedarkman

    P E Schoen Guest

    "thedarkman" wrote in message
    news:...

    > On my websites, when I click on a link, I am transferred
    > to a new page.


    > It is also possible to open the new page but keep the old one open.


    > Is there a code you can put in the root directory, a bit like
    > robots.txt to alter this?


    I think the default behavior of a link is to open a new page that replaces
    the previous one, in the current browser and tab, so that the BACK button
    returns to the page where the link was clicked. But on one forum I frequent,
    there is an option to open the link in a new tab, or a new window, which is
    another instance of the browser. Before tabs were introduced, there were
    only the two choices. I'm not sure what code is involved for these choices,
    but I know you can create a child window, although I think that is yet
    another option.

    I doubt there is any easy way to change the default action of the (client
    side) browser with a server-side text file. But it may be possible to add
    code to the web page that looks for such a file on the server and changes
    its behavior accordingly, although I think it would be more appropriate to
    use a client-side cookie where the user may adjust his/her own preference.

    Paul
     
    P E Schoen, Nov 26, 2011
    #3
  4. thedarkman

    Tim Streater Guest

    In article
    <>,
    thedarkman <> wrote:

    > On my websites, when I click on a link, I am transferred to a new
    > page.
    >
    > It is also possible to open the new page but keep the old one open.
    >
    > Is there a code you can put in the root directory, a bit like
    > robots.txt to alter this?


    You need to put:

    target='_blank'

    in each of your links where you want a new window while keeping the old
    one.

    --
    Tim

    "That excessive bail ought not to be required, nor excessive fines imposed,
    nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
     
    Tim Streater, Nov 26, 2011
    #4
  5. Tim Streater wrote:
    > In article
    > <>,
    > thedarkman <> wrote:
    >
    >> On my websites, when I click on a link, I am transferred to a new
    >> page.
    >>
    >> It is also possible to open the new page but keep the old one open.
    >>
    >> Is there a code you can put in the root directory, a bit like
    >> robots.txt to alter this?

    >
    > You need to put:
    >
    > target='_blank'
    >
    > in each of your links where you want a new window while keeping the old
    > one.
    >


    Not in my browser. I have it set not to. Doug is correct the answer is "no"

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Nov 27, 2011
    #5
  6. thedarkman

    picayunish Guest

    On 26-11-2011 17:50, thedarkman wrote:
    >
    >
    > On my websites, when I click on a link, I am transferred to a new
    > page.
    >
    > It is also possible to open the new page but keep the old one open.
    >
    > Is there a code you can put in the root directory, a bit like
    > robots.txt to alter this?


    No, not in robot.txt file.

    Can use a target="_blank" in an anchor.

    Or use a jacascript eg.

    In the <HEAD> before <BODY>
    <script type="text/javascript">
    var newWindow
    function makeNewWindow1() {
    newWindow =
    window.open("http://url","sub","toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,personalbar=yes,width=792px,height=443px")
    }

    function closeNewWindow() {
    newWindow = window.close()
    newWindow = null
    }
    </script>

    eg. anchor
    <a href="http://url" onClick="makeNewWindow3();return false">blah blah</a>


    However a lot of people have in the browser Javascript / pop-up
    disabled. They find it very annoying.
    So designers are recommended nit to use pop-up scripts.
    --
    Edwin van der Vaart
     
    picayunish, Nov 27, 2011
    #6
  7. thedarkman <> wrote

    >
    >
    > On my websites, when I click on a link, I am transferred to a new
    > page.
    >
    > It is also possible to open the new page but keep the old one open.
    >
    > Is there a code you can put in the root directory, a bit like
    > robots.txt to alter this?
    >
    > Thanks


    If you would like to keep the current tab or window open when you click
    on a link, then right click on it and choose open in new window or tab.
    Please don't try to force new windows/tabs on your visitors.

    --
    Adrienne Boswell
    Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
    The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
    Please respond to the group so others can share
     
    Adrienne Boswell, Dec 5, 2011
    #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. =?Utf-8?B?Tm92aWNl?=
    Replies:
    2
    Views:
    6,731
    Alan Ferrandiz Langley
    Jun 9, 2004
  2. Matt
    Replies:
    2
    Views:
    14,217
    bruce barker
    Aug 23, 2004
  3. Matt
    Replies:
    1
    Views:
    486
    Andrew Thompson
    Aug 22, 2004
  4. Matt
    Replies:
    5
    Views:
    3,077
    Michael Winter
    Aug 25, 2004
  5. Gordon
    Replies:
    3
    Views:
    359
    Steven Burn
    Apr 16, 2004
Loading...

Share This Page