Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. How do I Close print dialog opened by JScript by JScript itself?

How do I Close print dialog opened by JScript by JScript itself?

Scheduled Pinned Locked Moved Web Development
questionjavajavascripthtmlhardware
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    krishnaraj40
    wrote on last edited by
    #1

    My dot net application displays a Html page on a web control. The html page has a javascript embedded in it. The html page has button on it. When the html button is clicked, Java script lanches a print dialog using JScript's <code>Window.print().</code> There is some other application (Kind of Monitor) which closes the Dot net Window. As the control in the Dot net window hosts the Html, the html also unloaded. Problem: The print dialog launched by the JScript <code>Window.print()</code> call still displayed. <big>How do I close the print dialog using the JScript?</big> Thanks in Advance :doh:

    Y S 2 Replies Last reply
    0
    • K krishnaraj40

      My dot net application displays a Html page on a web control. The html page has a javascript embedded in it. The html page has button on it. When the html button is clicked, Java script lanches a print dialog using JScript's <code>Window.print().</code> There is some other application (Kind of Monitor) which closes the Dot net Window. As the control in the Dot net window hosts the Html, the html also unloaded. Problem: The print dialog launched by the JScript <code>Window.print()</code> call still displayed. <big>How do I close the print dialog using the JScript?</big> Thanks in Advance :doh:

      Y Offline
      Y Offline
      Yusuf
      wrote on last edited by
      #2

      I don't think you can close the print dialog from javascript. If that is possible, think of all the security issues that could arise.

      Yusuf May I help you?

      1 Reply Last reply
      0
      • K krishnaraj40

        My dot net application displays a Html page on a web control. The html page has a javascript embedded in it. The html page has button on it. When the html button is clicked, Java script lanches a print dialog using JScript's <code>Window.print().</code> There is some other application (Kind of Monitor) which closes the Dot net Window. As the control in the Dot net window hosts the Html, the html also unloaded. Problem: The print dialog launched by the JScript <code>Window.print()</code> call still displayed. <big>How do I close the print dialog using the JScript?</big> Thanks in Advance :doh:

        S Offline
        S Offline
        shamly
        wrote on last edited by
        #3

        Check the following forum post. It is not a solution to your question, but may give you an idea. Can javascript control the Print dialog options?[External Link]

        Tech Notes on Web Development and Software Development Technology

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups