Results 1 to 9 of 9

Thread: printing a page

  1. #1

    Thread Starter
    Hyperactive Member richy's Avatar
    Join Date
    Jan 1999
    Location
    Liverpool, England
    Posts
    353

    printing a page

    Although I've seen it says that you can't automatically print a webpage using JavaScript (http://javascript.internet.com/messages/print-page.html) is there actually no way of doing this? It would be very helpful in my application.
    ASP, PHP, VB, JavaScript, CSS, HTML, a little C and a little CGI.

    Richard Whitehouse.
    Join the Footie Predictions League


    "Make it idiot proof and someone will make a better idiot."

  2. #2
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  3. #3
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You can't automatically print a web page.

    You know those little pop-up ads that are so annoying? How would you like if they started coming out your printer?
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  4. #4

    Thread Starter
    Hyperactive Member richy's Avatar
    Join Date
    Jan 1999
    Location
    Liverpool, England
    Posts
    353
    thats very true, but i do need something like that for my web application. is there anyway that the javascript can tell as to whether the user has clicked ok on the print dialogue box when it appears using javascript?
    ASP, PHP, VB, JavaScript, CSS, HTML, a little C and a little CGI.

    Richard Whitehouse.
    Join the Footie Predictions League


    "Make it idiot proof and someone will make a better idiot."

  5. #5
    Junior Member
    Join Date
    Dec 2000
    Location
    London
    Posts
    25
    You can't get around the dialog box as you may have seen with my example. Why do you want to know whether the user clicked ok or not?

  6. #6

    Thread Starter
    Hyperactive Member richy's Avatar
    Join Date
    Jan 1999
    Location
    Liverpool, England
    Posts
    353
    then the user won't need to click on any more buttons than need be. Once the user has clicked ok, then its ok for the next record to be shown.
    ASP, PHP, VB, JavaScript, CSS, HTML, a little C and a little CGI.

    Richard Whitehouse.
    Join the Footie Predictions League


    "Make it idiot proof and someone will make a better idiot."

  7. #7
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    I doubt it. Printing webpages is a major security issue, and the browser is not going to give you very much control or options that have to do with it.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  8. #8
    kayoca
    Guest

    And how about...

    And how about setting the default setting of your printer dialog?
    Like set your landscape to default?

  9. #9
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    If you can restrict/recommend your users to use IE 4.01 or higher, you can use the ScriptX component from http://www.meadroid.com/scriptx to control printing.

    This component enables you to set the orientation, footer/header text and margins in code without changing the browser's original settings.

    ....and it's free!
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width