Web Analytics Made Easy -
StatCounter Printing a Document - CodingForum

Announcement

Collapse
No announcement yet.

Printing a Document

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printing a Document

    Is it possible to print a links target page without the page being opened
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #2
    Try making an invisible iframe, setting the location of the document you want to print, and print from it. That could work, I think.

    Comment


    • #3
      mr j...
      /me has this just a copied/credited/saved®...
      x_goose_x ...08-05-2002 11:23 AM
      On main page add:

      Code:
      <a href="java script: t=window.open('printpage. htm','','width=100,height=100,top=3000,left=3000')
      ; setTimeout('t.window.close()',10000); t.blur(); window.focus();">Print</a>
      n' thennn...

      On printer version of the page add:

      Code:
      <script>
      
      function prnt() {
      
      if (window.print) {
      
      window.print();
      
      }
      
      }
      
      window.onload=prnt;
      
      </script>

      orrr...

      just a nother® option is:

      <link rel=alternate media=print href="printversion.doc">

      But unfortunately only IE!


      just a hoping® thattt helps...goodluck...:O)))
      The New JustaBuster Version 2.0 OR JustaBusta Lite V2.0
      ...just a special® thanx kinda hugs to jkd n' nex ...:O)))

      CommemorateWTC.com --Please lend your support

      Comment


      • #4
        If you just wanted to do this locally, the Shell Object might be an option:


        <html>
        <head><title>Shell-Print-File</title>

        <script type="text/JScript">
        function printF(aPath){
        var pNm, nSp, sAp;
        aPath = aPath.split("\\");
        pNm = aPath.pop();
        nSp = aPath.join("\\");
        sAp = new ActiveXObject("Shell.Application");
        try{
        sAp.NameSpace(nSp).ParseName(pNm).InvokeVerb("print");}
        catch(e){
        alert(e + " = path-error...")}
        }
        </script>

        </head>
        <body>

        <a href="C:\Some Folder\a Sub-Folder\page.html" onclick="printF(unescape(this.pathname));return false">print-this-link</a>

        </body>
        </html>
        Last edited by swmr; Nov 29, 2003, 11:57 PM.
        hmm... ?

        Comment


        • #5
          Found this somewhere...
          Attached Files
          Glenn
          vBulletin Mods That Rock!

          Comment

          Working...
          X