[thelist] onClick(Image.Print())

James Aylard evolt at pixelwright.com
Wed Jul 2 12:42:17 CDT 2003


Ben Morrison wrote:

> Window.print doesn¹t work on a mac, and is badly supported.
> Use Toms approach, search 'css media="print"'

    It's supported in IE 5/Win32 on up, and in Netscape since version 4.x.,
and in current versions of Opera to start with. That level of support
doesn't seem so bad to me. As with any DOM method, it would be wise to test
for support in the script before attempting to call it, and to implement
fallback code for those browsers that don't support it.
    Is it a good idea to use the print() method? So long as the user clearly
understands that clicking on the image will pop the print dialog, I don't
have a problem with it.
    Also, window.print() and the use of CSS with a "print" media value are
not at all mutually exclusive. In fact, using the two together may be the
most elegant way to fulfill Rob's original request.

James Aylard



More information about the thelist mailing list