window.print and history.back

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

    #1

    window.print and history.back

    Hi!

    I'm trying to use a combination of windows.print() followed
    directly by history.back().

    The desired effect is to print the shown window and go back to that
    one before.

    I'm presenting a user a database result screen that's only
    generated to be printed.
    He shall get back to his previous sight after printing.

    The problem:
    history.back() is done before the printing dialog appears and
    therefore the "previous" window is printed.

    Can anyone tell me where my fault is? Or is it just a "normal"
    behaviour of my browser?
    (btw, I'm using IE 5.5)


    --
    Marco Dieckhoff
    icq# 22243433
    GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys
  • HikksNotAtHome

    #2
    Re: window.print and history.back

    In article <bgar1o$ash$1@r zcomm2.rz.tu-bs.de>, Marco Dieckhoff <dieck@gmx.de >
    writes:
    [color=blue]
    >Hi!
    >
    >I'm trying to use a combination of windows.print() followed
    >directly by history.back().
    >
    >The desired effect is to print the shown window and go back to that
    >one before.
    >
    >I'm presenting a user a database result screen that's only
    >generated to be printed.
    >He shall get back to his previous sight after printing.
    >
    >The problem:
    >history.back () is done before the printing dialog appears and
    >therefore the "previous" window is printed.
    >
    >Can anyone tell me where my fault is? Or is it just a "normal"
    >behaviour of my browser?
    >(btw, I'm using IE 5.5)[/color]

    Your fault lies in trying to create two pages - one for print, one for screen.

    http://www.alistapart.com/stories/goingtoprint/
    --
    Randy
    All code posted is dependent upon the viewing browser
    supporting the methods called, and Javascript being enabled.

    Comment

    Working...