code to popup link in new browser window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zn

    code to popup link in new browser window

    How can I cause a link on a page to open up a new browser window when the
    link is clicked on? I've noticed javascript code sometimes when I try to
    right-click a link and open it in another window.

    Is there a way to use straight HTML to cause a link to open a new browser
    window?

    Thanks.
  • Starshine Moonbeam

    #2
    Re: code to popup link in new browser window

    In article <Xns95D2E08BE22 F3znzn122eduinv alid@216.196.97 .131>, zn
    (zn@zn122.edu.i nvalid) dropped a +5 bundle of words...
    [color=blue]
    > How can I cause a link on a page to open up a new browser window when the
    > link is clicked on? I've noticed javascript code sometimes when I try to
    > right-click a link and open it in another window.
    >
    > Is there a way to use straight HTML to cause a link to open a new browser
    > window?[/color]

    target=_blank

    --
    Starshine Moonbeam
    mhm31x9 Smeeter#29 WSD#30
    sTaRShInE_mOOnB eAm aT HoTmAil dOt CoM









    Comment

    • Stan Brown

      #3
      Re: code to popup link in new browser window

      "zn" wrote in comp.infosystem s.www.authoring.html:[color=blue]
      >How can I cause a link on a page to open up a new browser window when the
      >link is clicked on?[/color]

      It depends on your browser, but usually it's right-click and then
      select "Open in New Window".

      I'm sure you don't mean to ask how to write a Web page that will open
      its link in a new window, because that is evil and anti-user. (Think
      back to how often you've been annoyed by windows opening up unasked,
      and don't do that to your visitors.)

      --
      Stan Brown, Oak Road Systems, Tompkins County, New York, USA

      HTML 4.01 spec: http://www.w3.org/TR/html401/
      validator: http://validator.w3.org/
      CSS 2.1 spec: http://www.w3.org/TR/CSS21/
      validator: http://jigsaw.w3.org/css-validator/
      Why We Won't Help You:

      Comment

      • zn

        #4
        Re: code to popup link in new browser window

        Stan Brown <the_stan_brown @fastmail.fm> wrote in
        news:MPG.1c4293 e0c054a45598cff c@news.odyssey. net:
        [color=blue]
        > "zn" wrote in comp.infosystem s.www.authoring.html:[color=green]
        >>How can I cause a link on a page to open up a new browser window when
        >>the link is clicked on?[/color]
        >
        > It depends on your browser, but usually it's right-click and then
        > select "Open in New Window".
        >
        > I'm sure you don't mean to ask how to write a Web page that will open
        > its link in a new window, because that is evil and anti-user. (Think
        > back to how often you've been annoyed by windows opening up unasked,
        > and don't do that to your visitors.)
        >[/color]

        Once I read up about the command, I realized the connection with the
        dreaded pop-up windows, and also that some anti-pop programs would disable
        the feature, so I came to my senses.

        What I wanted to do was keep the reader on one page but give them the
        option to look at an associated reference page quickly without disrupting
        where they were (I guess like a basic popup window). But is sounds like
        it'll just cause more aggravation than cause good.

        Comment

        • Neal

          #5
          Re: code to popup link in new browser window

          On Sun, 02 Jan 2005 21:05:18 -0600, zn <zn@zn122.edu.i nvalid> wrote:
          [color=blue]
          > How can I cause a link on a page to open up a new browser window when the
          > link is clicked on? I've noticed javascript code sometimes when I try to
          > right-click a link and open it in another window.[/color]

          I hate that too. That is annoying, dumb and wrong.
          [color=blue]
          > Is there a way to use straight HTML to cause a link to open a new browser
          > window?[/color]

          Yes, but you really don't need a new window.

          Comment

          • Neal

            #6
            Re: code to popup link in new browser window

            On Sun, 02 Jan 2005 23:14:18 -0600, zn <zn@zn122.edu.i nvalid> wrote:
            [color=blue]
            > Once I read up about the command,[/color]

            What "command"?
            [color=blue]
            > I realized the connection with the
            > dreaded pop-up windows, and also that some anti-pop programs would
            > disable
            > the feature, so I came to my senses.
            >
            > What I wanted to do was keep the reader on one page but give them the
            > option to look at an associated reference page quickly without disrupting
            > where they were (I guess like a basic popup window). But is sounds like
            > it'll just cause more aggravation than cause good.[/color]

            I agree. I can open new windows all I like. So can your user, if it's of
            any benefit.

            Comment

            • jake

              #7
              Re: code to popup link in new browser window

              In message <Xns95D324415E8 Bznzn122eduinva lid@216.196.97. 131>, zn
              <zn@zn122.edu.i nvalid> writes[color=blue]
              >Stan Brown <the_stan_brown @fastmail.fm> wrote in
              >news:MPG.1c429 3e0c054a45598cf fc@news.odyssey .net:
              >[color=green]
              >> "zn" wrote in comp.infosystem s.www.authoring.html:[color=darkred]
              >>>How can I cause a link on a page to open up a new browser window when
              >>>the link is clicked on?[/color]
              >>
              >> It depends on your browser, but usually it's right-click and then
              >> select "Open in New Window".
              >>
              >> I'm sure you don't mean to ask how to write a Web page that will open
              >> its link in a new window, because that is evil and anti-user. (Think
              >> back to how often you've been annoyed by windows opening up unasked,
              >> and don't do that to your visitors.)
              >>[/color]
              >
              >Once I read up about the command, I realized the connection with the
              >dreaded pop-up windows, and also that some anti-pop programs would disable
              >the feature, so I came to my senses.
              >
              >What I wanted to do was keep the reader on one page but give them the
              >option to look at an associated reference page quickly without disrupting
              >where they were (I guess like a basic popup window). But is sounds like
              >it'll just cause more aggravation than cause good.[/color]

              In this case (as a reference item) I would think that a separate,
              *smaller* window would be fine.

              i.e. a 'pop-up' window.

              Unfortunately, you will need to use some javascript for this, which
              means that you'll also have to provide a means for the
              javascript-challenged to open the page in the existing window --
              assuming that it's an essential part of your design :-(

              If you do open a page in a new window, be sure to put a short note
              somewhere that you will be doing so. This is important for people who
              may be listening to your site rather than looking at it.

              regards.

              --
              Jake

              Comment

              • zn

                #8
                Re: code to popup link in new browser window

                Neal <neal413@yahoo. com> wrote in
                news:opsj0rtduu 6v6656@news.ind ividual.net:
                [color=blue]
                > On Sun, 02 Jan 2005 23:14:18 -0600, zn <zn@zn122.edu.i nvalid> wrote:
                >[color=green]
                >> Once I read up about the command,[/color]
                >
                > What "command"?[/color]

                target=_blank
                [color=blue][color=green]
                >> I realized the connection with the
                >> dreaded pop-up windows, and also that some anti-pop programs would
                >> disable
                >> the feature, so I came to my senses.
                >>
                >> What I wanted to do was keep the reader on one page but give them the
                >> option to look at an associated reference page quickly without
                >> disrupting where they were (I guess like a basic popup window). But
                >> is sounds like it'll just cause more aggravation than cause good.[/color]
                >
                > I agree. I can open new windows all I like. So can your user, if it's
                > of any benefit.
                >[/color]

                Comment

                • Harlan Messinger

                  #9
                  Re: code to popup link in new browser window


                  "zn" <zn@zn122.edu.i nvalid> wrote in message
                  news:Xns95D3B38 E4A51Aznzn122ed uinvalid@216.19 6.97.131...[color=blue]
                  > Neal <neal413@yahoo. com> wrote in
                  > news:opsj0rtduu 6v6656@news.ind ividual.net:
                  >[color=green]
                  > > On Sun, 02 Jan 2005 23:14:18 -0600, zn <zn@zn122.edu.i nvalid> wrote:
                  > >[color=darkred]
                  > >> Once I read up about the command,[/color]
                  > >
                  > > What "command"?[/color]
                  >
                  > target=_blank[/color]

                  It's not a command, it's an attribute.

                  Comment

                  • Neal

                    #10
                    Re: code to popup link in new browser window

                    Harlan Messinger <h.messinger@co mcast.net> wrote:[color=blue]
                    > "zn" <zn@zn122.edu.i nvalid> wrote[color=green][color=darkred]
                    >> > What "command"?[/color]
                    >> target=_blank[/color]
                    > It's not a command, it's an attribute.[/color]

                    .... and a value.

                    Comment

                    • Harlan Messinger

                      #11
                      Re: code to popup link in new browser window


                      "Neal" <neal413@yahoo. com> wrote in message
                      news:opsj1tdl0e 6v6656@news.ind ividual.net...[color=blue]
                      > Harlan Messinger <h.messinger@co mcast.net> wrote:[color=green]
                      > > "zn" <zn@zn122.edu.i nvalid> wrote[color=darkred]
                      > >> > What "command"?
                      > >> target=_blank[/color]
                      > > It's not a command, it's an attribute.[/color]
                      >
                      > ... and a value.[/color]

                      And an operator.

                      Comment

                      • Neal

                        #12
                        Re: code to popup link in new browser window

                        Harlan Messinger <h.messinger@co mcast.net> wrote:[color=blue]
                        > "Neal" <neal413@yahoo. com> wrote[color=green]
                        >> Harlan Messinger <h.messinger@co mcast.net> wrote:[color=darkred]
                        >> > "zn" <zn@zn122.edu.i nvalid> wrote
                        >> >> > What "command"?
                        >> >> target=_blank
                        >> > It's not a command, it's an attribute.[/color]
                        >>
                        >> ... and a value.[/color]
                        >
                        > And an operator.[/color]

                        And a major pain in the ass.

                        Comment

                        • Lachlan Hunt

                          #13
                          Re: code to popup link in new browser window

                          zn wrote:[color=blue]
                          > Once I read up about the command [target attribute]...[/color]



                          --
                          Lachlan Hunt

                          http://GetFirefox.com/ Rediscover the Web
                          http://SpreadFirefox.com/ Igniting the Web

                          Comment

                          • zn

                            #14
                            Re: code to popup link in new browser window

                            Neal <neal413@yahoo. com> wrote in news:opsj1tmio0 6v6656
                            @news.individua l.net:
                            [color=blue]
                            > Harlan Messinger <h.messinger@co mcast.net> wrote:[color=green]
                            >> "Neal" <neal413@yahoo. com> wrote[color=darkred]
                            >>> Harlan Messinger <h.messinger@co mcast.net> wrote:
                            >>> > "zn" <zn@zn122.edu.i nvalid> wrote
                            >>> >> > What "command"?
                            >>> >> target=_blank
                            >>> > It's not a command, it's an attribute.
                            >>>
                            >>> ... and a value.[/color]
                            >>
                            >> And an operator.[/color]
                            >
                            > And a major pain in the ass.
                            >[/color]

                            Thanks to all ... I'm a beginner.

                            Comment

                            Working...