Disable Print button


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Disable Print button

  1. #1
    Nate Guest

    Disable Print button


    I need to disable the print capability on the browser. How do I do this?

    TIA
    Nate

  2. #2
    Kris Eiben Guest

    Re: Disable Print button

    Easy answer: walk over to the user's desk and turn off his printer.

    And, I'm pretty sure that's the only real answer. You can use
    Javascript to open a new window without the button bar or menus, and
    disable right-clicking, but then he can disable Javascript and bring up
    the cached page. And even if you then write out the contents of the
    page from Javascript, so he has to have it enabled -- which sounds
    extremely kludgey and difficult to maintain -- and keep that page out of
    the cache, he can always hit the "print screen" button, which afaik
    cannot be disabled by browser script. If someone is really determined
    to print your page, you really can't stop him.

    If you're satisfied with a solution that'll just keep people who don't
    know how to disable Javascript from printing, then check the Javascript
    FAQs at irt.org for examples of how to do all of the above.

    "Nate" <nkane@enak.com> wrote in message news:3cec0295@10.1.10.29...
    >
    > I need to disable the print capability on the browser. How do I do

    this?



  3. #3
    Harish Kumar Guest

    Re: Disable Print button


    Nate,

    There are 2 ways you can do this -

    A) If you can execute command-line method - then you can run IE in kiosk
    mode.

    That is if you run "iexplore" from command line, it will open a new IE browser.
    If you run "iexplore" with "k" switch like -

    iexplore -k

    it will open IE sans any menu. The downside is this is not the best way to
    do this. You really cannot take active role in controlling the IE.

    B) The better way would be using WSH. For example, the following script will
    open a browser and will pass a URL for the browser to display -

    dim ObjBrow
    set objBrow = WScript.CreateObject ("InternetExplorer.Application")
    objBrow.Toolbar = false
    objBrow.Navigate "http://news.devx.com"
    objBrow.Visible = True

    WSH comes installed with Windows 98 and Windows 2000. For Windows 95 & Windows
    NT, you need to download WSH from - http://msdn.microsoft.com/scripting

    BTW, why do you want to do this?

    Harish

    "Nate" <nkane@enak.com> wrote:
    >
    >I need to disable the print capability on the browser. How do I do this?
    >
    >TIA
    >Nate



  4. #4
    Guest

    Re: Disable Print button


    Thanks,

    I am creating an Employee Evaluation web app for one of my clients. They
    have asked that all printouts be handled by the HR department.

    Nate

    "Harish Kumar" <HarishM@MailCity.Com> wrote:
    >
    >Nate,
    >
    >There are 2 ways you can do this -
    >
    >A) If you can execute command-line method - then you can run IE in kiosk
    >mode.
    >
    >That is if you run "iexplore" from command line, it will open a new IE browser.
    >If you run "iexplore" with "k" switch like -
    >
    >iexplore -k
    >
    >it will open IE sans any menu. The downside is this is not the best way

    to
    >do this. You really cannot take active role in controlling the IE.
    >
    >B) The better way would be using WSH. For example, the following script

    will
    >open a browser and will pass a URL for the browser to display -
    >
    >dim ObjBrow
    >set objBrow = WScript.CreateObject ("InternetExplorer.Application")
    >objBrow.Toolbar = false
    >objBrow.Navigate "http://news.devx.com"
    >objBrow.Visible = True
    >
    >WSH comes installed with Windows 98 and Windows 2000. For Windows 95 & Windows
    >NT, you need to download WSH from - http://msdn.microsoft.com/scripting
    >
    >BTW, why do you want to do this?
    >
    >Harish
    >
    >"Nate" <nkane@enak.com> wrote:
    >>
    >>I need to disable the print capability on the browser. How do I do this?
    >>
    >>TIA
    >>Nate

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center