printing external html page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dm

    #1

    printing external html page

    Hey,
    I was wondering if anyone knew a way to print a page, other than the one
    displayed. I don't want the other page to display at all. I was thinking
    of placing a button on the page that is being displayed, which will pull
    up the print dialog to print another page. Is that possible? Thanks in
    advance for any help.

    Dave
  • Stuart Palmer

    #2
    Re: printing external html page

    I think the solution here is to open the newwindow = window.open(new page);
    but outside the screens view i.e set the popup to open in a specific
    location, then newwindow.print (); then newwindow.close ();

    I think I have seen this done before, but don't forget about these peps
    without JS who won't be able to do this in this way.

    Stu

    "dm" <hydr0gen@mn.as tound.net> wrote in message
    news:c0evre$k1q $1@news.astound .net...[color=blue]
    > Hey,
    > I was wondering if anyone knew a way to print a page, other than the one
    > displayed. I don't want the other page to display at all. I was thinking
    > of placing a button on the page that is being displayed, which will pull
    > up the print dialog to print another page. Is that possible? Thanks in
    > advance for any help.
    >
    > Dave[/color]


    Comment

    • dm

      #3
      Re: printing external html page

      Thanks for replying,
      I have figured out a way in the meantime similar to your idea with some
      help from a post somewhere else. I have a layer containing an iframe
      with the text positioned off screen. I made a button in the active html
      that that executes code to put focus on the frame and print it. Before
      that I have it test the type of browser to determine which code to
      execute to print the page (since there seem to differences between the
      browsers). Works like a charm now. Thanks.

      dave

      Stuart Palmer wrote:[color=blue]
      > I think the solution here is to open the newwindow = window.open(new page);
      > but outside the screens view i.e set the popup to open in a specific
      > location, then newwindow.print (); then newwindow.close ();
      >
      > I think I have seen this done before, but don't forget about these peps
      > without JS who won't be able to do this in this way.
      >
      > Stu
      >
      > "dm" <hydr0gen@mn.as tound.net> wrote in message
      > news:c0evre$k1q $1@news.astound .net...
      >[color=green]
      >>Hey,
      >>I was wondering if anyone knew a way to print a page, other than the one
      >>displayed. I don't want the other page to display at all. I was thinking
      >>of placing a button on the page that is being displayed, which will pull
      >>up the print dialog to print another page. Is that possible? Thanks in
      >>advance for any help.
      >>
      >>Dave[/color]
      >
      >
      >[/color]

      Comment

      Working...