Loading ...
Sorry, an error occurred while loading the content.

hyper link printing

Expand Messages
  • Harvey R. Savage
    Hi All, For the html ers. Is there a hypertext command that can be used in a fashion as an href that instead of sending you to another link, it will print,
    Message 1 of 11 , Sep 1, 2000
    • 0 Attachment
      Hi All,

      For the html'ers. Is there a hypertext command that can be used
      in a fashion as an 'href' that instead of sending you to another
      link, it will print, on your local printer, whatever is at the
      address in the hyper link? Preferably, without any disruption in
      viewing the page you are currently viewing.

      Anxiously awaiting answers.

      hrs

      --
      ¿? Harvey R. Savage
      ¿? 40 Golf Course Road
      ¿? Eldorado, IL 62930
      ¿? 618-273-5003
      ¿? icq 21106393
      ¿? hsavage@...
      ¿? (ktcalci)
    • Grant
      ... There is but it is ie5 specific. ns6 should do this as well as it is standards compliant html4 but it doesn t as yet. The key is the link tag. The
      Message 2 of 11 , Sep 2, 2000
      • 0 Attachment
        > For the html'ers. Is there a hypertext command that can be used
        > in a fashion as an 'href' that instead of sending you to another
        > link, it will print, on your local printer, whatever is at the
        > address in the hyper link? Preferably, without any disruption in
        > viewing the page you are currently viewing.

        There is but it is ie5 specific.
        ns6 should do this as well as it is standards compliant html4 but it
        doesn't as yet.

        The key is the link tag.
        The window.print() method is just the same as pressing the toolbar print
        button.

        Create 2 docs in same dir

        -NoName01.htm

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "DTD/xhtml1-strict.DTD">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <link rel="alternate" media="print" href="NoName02.htm" />
        <head>
        <title></title>
        </head>
        <body>
        <p>
        Hello world
        </p>
        <button onclick="window.print()">Print NoName02.htm</button>
        </body>
        </html>

        -NoName02.htm

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "DTD/xhtml1-strict.DTD">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
        <title></title>
        </head>
        <body>
        <p>
        print this
        </p>
        </body>
        </html>


        for futher info see
        http://www.siteexperts.com/tips/styles/ts41/page1.asp
      • Harvey R. Savage
        Hi Grant, As you ve probably figured out I m trying to gain the ability to print a page identical to the page being viewed, but, without the banner ad!
        Message 3 of 11 , Sep 2, 2000
        • 0 Attachment
          Hi Grant,

          As you've probably figured out I'm trying to gain the ability to
          print a page identical to the page being viewed, but, without the
          banner ad! Looking at it from that perspective maybe there's
          another way to achieve it.

          I'll appreciate any suggestions.

          hrs


          Grant wrote:
          >
          > The key is the link tag.
          > The window.print() method is just the same as pressing the toolbar print
          > button.
          >
          > Create 2 docs in same dir
          >
          > -NoName01.htm
          >
          > <?xml version="1.0" encoding="UTF-8"?>
          > <!DOCTYPE html
          > PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          > "DTD/xhtml1-strict.DTD">
          > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
          > <link rel="alternate" media="print" href="NoName02.htm" />
          > <head>
          > <title></title>
          > </head>
          > <body>
          > <p>
          > Hello world
          > </p>
          > <button onclick="window.print()">Print NoName02.htm</button>
          > </body>
          > </html>
          >
          > -NoName02.htm
          >
          > <?xml version="1.0" encoding="UTF-8"?>
          > <!DOCTYPE html
          > PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          > "DTD/xhtml1-strict.DTD">
          > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
          > <head>
          > <title></title>
          > </head>
          > <body>
          > <p>
          > print this
          > </p>
          > </body>
          > </html>
          >
          > for futher info see
          > http://www.siteexperts.com/tips/styles/ts41/page1.asp

          --
          ¿? Harvey R. Savage
          ¿? 40 Golf Course Road
          ¿? Eldorado, IL 62930
          ¿? 618-273-5003
          ¿? icq 21106393
          ¿? hsavage@...
          ¿? (ktcalci)
        • Scott Fordin
          ... I m confused: window.print() is a standard JavaScript method; it s not peculiar to IE. ... If you want to use XHTML as suggested below, then yes, you re
          Message 4 of 11 , Sep 2, 2000
          • 0 Attachment
            > > For the html'ers. Is there a hypertext command that can be used
            > > in a fashion as an 'href' that instead of sending you to another
            > > link, it will print, on your local printer, whatever is at the
            > > address in the hyper link? Preferably, without any disruption in
            > > viewing the page you are currently viewing.
            >
            >There is but it is ie5 specific.
            >ns6 should do this as well as it is standards compliant html4 but it
            >doesn't as yet.

            I'm confused: window.print() is a standard JavaScript method; it's
            not peculiar to IE.

            >The key is the link tag.
            >The window.print() method is just the same as pressing the toolbar print
            >button.

            If you want to use XHTML as suggested below, then yes, you're
            getting into IE stuff -- at least for now, and at least until it's
            embraced as a truly open standard, rather than one that's dependent
            on Windows hooks.

            The simple, more widely compliant JavaScript method would be:

            <a href="javascript:window.print()">Print this</a>

            Scott

            ><?xml version="1.0" encoding="UTF-8"?>
            ><!DOCTYPE html
            >PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            >"DTD/xhtml1-strict.DTD">
            >
            >Hello world
            >Print NoName02.htm
            >-NoName02.htm
            >
            ><?xml version="1.0" encoding="UTF-8"?>
            ><!DOCTYPE html
            >PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            >"DTD/xhtml1-strict.DTD">
          • Harvey R. Savage
            Hello Scott, Is there a way to use this java command to print a remote file, which would be a replica of the current page without the banner ads? That s what
            Message 5 of 11 , Sep 2, 2000
            • 0 Attachment
              Hello Scott,

              Is there a way to use this java command to print a remote file,
              which would be a replica of the current page without the banner
              ads?

              That's what Grant had in mind and we were exploring options, or
              lack thereof, with those of us using Netscape as our browser.

              I will experiment with this java command though, the last one you
              gave me worked great.

              hrs

              Scott Fordin wrote:
              > >The key is the link tag.
              > >The window.print() method is just the same as pressing the toolbar print
              > >button.
              >
              > If you want to use XHTML as suggested below, then yes, you're
              > getting into IE stuff -- at least for now, and at least until it's
              > embraced as a truly open standard, rather than one that's dependent
              > on Windows hooks.
              >
              > The simple, more widely compliant JavaScript method would be:
              >
              > <a href="javascript:window.print()">Print this</a>
              >
              > Scott
              >

              --
              ¿? Harvey R. Savage
              ¿? 40 Golf Course Road
              ¿? Eldorado, IL 62930
              ¿? 618-273-5003
              ¿? icq 21106393
              ¿? hsavage@...
              ¿? (ktcalci)
            • Grant
              ... As i said in my post The key is the link tag. This use of the Link tag is clearly outlined in the w3c see
              Message 6 of 11 , Sep 2, 2000
              • 0 Attachment
                > -----Original Message-----
                > From: Scott Fordin [mailto:sfordin@...]
                > Sent: Sunday, 3 September 2000 2:02 a.m.
                > To: ntb-html@egroups.com
                > Subject: RE: [NH] hyper link printing

                > >There is but it is ie5 specific.
                > >ns6 should do this as well as it is standards compliant html4 but it
                > >doesn't as yet.
                >
                > I'm confused: window.print() is a standard JavaScript method; it's
                > not peculiar to IE.

                As i said in my post "> >The key is the link tag."

                This use of the Link tag is clearly outlined in the w3c
                see
                http://www.w3.org/TR/html40/struct/links.html#h-12.1.2

                Following is an example of how it sould be used comes from the standard.

                <HEAD>
                <TITLE>Reference manual</TITLE>
                <LINK media="print" title="The manual in postscript"
                type="application/postscript"
                rel="alternate"
                href="http://someplace.com/manual/postscript.ps">
                </HEAD>

                imho, ie's use of the link tag is entirely compliant with the standard as
                such is non-propriety

                > If you want to use XHTML as suggested below, then yes, you're
                > getting into IE stuff -- at least for now, and at least until it's
                > embraced as a truly open standard,

                Wrong wrong wrong

                XHTML is a w3c standard. see
                http://www.w3.org/MarkUp/
                It was designed to be backward compatible with existing browsers while
                being a pointer to our xml future.
                As such if you markUp in xhtml then existing browsers will have no trouble
                in parsing and rendering the display.

                >rather than one that's dependent
                > on Windows hooks.

                Markup is just plain text with a few tags. Markup is not compiled it is
                parsed ...there are no hooks.
                Ie and ns both run on the same platform. In this case ie is more compliant
                than ns...

                > The simple, more widely compliant JavaScript method would be:
                >
                > <a href="javascript:window.print()">Print this</a>
                >

                According to the html4 xhtml standards you ought to be able to place event
                handlers in just about every element in the body. (ie4+ does ns4 doesn't
                and is way behind the play -- ns6 will)

                Apart from stuff in the HTML standard checkout
                http://www.w3.org/DOM/

                If you are interested in standards join the
                http://www.webstandards.org
                Who's latest article slams ns
                http://www.webstandards.org/wfw/ns0700.html
                And yes they are just as hard on ie.
              • Grant
                ... Oh ok I thought you wanted to print an alternative document from the existing page without visiting that page. ... Here we use a stylesheet and create an
                Message 7 of 11 , Sep 2, 2000
                • 0 Attachment
                  > As you've probably figured out I'm trying to gain the ability to
                  > print a page identical to the page being viewed, but, without the
                  > banner ad! Looking at it from that perspective maybe there's
                  > another way to achieve it.

                  Oh ok I thought you wanted to print an alternative document from the
                  existing page without visiting that page.

                  > print a page identical to the page being viewed, but, without the
                  > banner ad!

                  Here we use a stylesheet
                  and create an @media rule
                  Set the rule for the element(or class) we want to ignore as display: none

                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE html
                  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                  "DTD/xhtml1-strict.DTD">
                  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                  <style>
                  @media print
                  {
                  div


                  display: none;
                  }
                  }
                  </style>
                  <head>
                  <title></title>
                  </head>
                  <body>
                  <div>
                  Banner add header: This will not print out
                  </div>
                  <form>
                  <p>
                  Hello world
                  <input type="button" onclick="window.print()" value="Print" />
                  </p>
                  </form>
                  </body>
                  </html>

                  The @media rule is standards compliant css2
                  OK -- ie5
                  OK -- ns6
                  ? --Opera 4 likely but haven't tested
                  ? -- ie4 unlikely but haven't tested
                  ? -- nn4 unlikely but haven't tested
                • Jody
                  Hi Grant and All, ... Somebody please post when the final of NS6 has been released if it has not already in which case, let us know. ;) Happy HTML n! Jody
                  Message 8 of 11 , Sep 2, 2000
                  • 0 Attachment
                    Hi Grant and All,

                    >OK -- ns6

                    Somebody please post when the final of NS6 has been released if
                    it has not already in which case, let us know. ;)

                    Happy HTML'n!
                    Jody

                    http://www.sureword.com/notetab

                    The NoteTab and Html List...
                    mailto:Ntb-html-Subscribe@...
                    mailto:Ntb-html-UnSubscribe@...
                  • Grant
                    Where did that curly go? I thought I just pasted from notetab to outlook. I musta deleted somehow ... of course it should read @media print { div
                    Message 9 of 11 , Sep 3, 2000
                    • 0 Attachment
                      Where did that curly go? I thought I just pasted from notetab to outlook. I
                      musta deleted somehow

                      > @media print
                      > {
                      > div
                      >
                      >
                      > display: none;
                      > }
                      > }

                      of course it should read

                      <style>
                      @media print
                      {
                      div


                      display: none;
                      }
                      }
                      </style>
                    • Grant
                      ... This must be some wierd outlook formating thingy. I checked my sent box and the sent item looks ok but when I receive imy post the opening curly bracket
                      Message 10 of 11 , Sep 3, 2000
                      • 0 Attachment
                        > Where did that curly go? I thought I just pasted from notetab to
                        > outlook.

                        This must be some wierd outlook formating thingy. I checked my sent box and
                        the sent item looks ok but when I receive imy post the opening curly bracket
                        after the div is not there.
                        I'll try a different tack

                        @media print{
                        div{
                        display: none;
                        }
                        }
                      • Grant
                        ... I m testing on ns6 preview release 2. I think the final release is some time of. I ve also created netscape 6 version of the color picker. Apart from the
                        Message 11 of 11 , Sep 4, 2000
                        • 0 Attachment
                          > Somebody please post when the final of NS6 has been released if
                          > it has not already in which case, let us know. ;)
                          >

                          I'm testing on ns6 preview release 2.
                          I think the final release is some time of.

                          I've also created netscape 6 version of the color picker.
                          Apart from the layout, It was pretty easy and only reqired me to change a
                          non-standard ie specific
                          event-handler "onpropertychange" in the select objects to the standard
                          "onclick".
                          http://www.markup.co.nz/colorPicker/back_to_font_netscape6.htm
                          This also works for ie but is less fun as the ie specific version. When
                          the focus changes from one option to another in ie this triggers the
                          "onpropertychange" in the select object so in ie you can dynamically change
                          the display text via the wheel or up-down keys.

                          Anyway if it's going to this easy to create dynamic pages in both ns6 and
                          ie5 then the sooner ns4 is sent to the dustbin of history the better.
                        Your message has been successfully submitted and would be delivered to recipients shortly.