Results 1 to 3 of 3

Thread: How to do script for print page?

  1. #1
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to do script for print page?

    I do not know how to do that it will open dialog box for printing particular window when user clicks on link PRINT

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <a href="javascript:void(0);" onclick="if(window.print) window.print();return false;">Print</a>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Open ne window and AUTOMATIC open print box? How...

    I have code to open new window

    PHP Code:
         <a href="myfile.pdf" onclick="NewWindow(this.href,'Port','600','420','yes');return false;"
    Is possible to add into this code also code which will open automatic print dialog box? I have code to print when user clicks on link Print:
    PHP Code:

     
    <a href="javascript:void(0);" onclick="if(window.print) window.print();return false;">Print</a
    I can not put into href="" because there is already href="myfile.pdf"

    Is this possible?
    Last edited by toplisek; 01-23-2006 at 12:32 PM.

Bookmarks

Posting Permissions

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