Cold Fusion Tips-N-Tricks
Display the Browser Print function

If you have a page that the user has to print out (such as Shipping information that needs to be included with the package), it's real easy to bring up the print dialog box. Simply modify your <body> tag to add the following attribute: onLoad="print()".

As soon as the page finishes loading, the Print dialog box will be displayed. If you want to display the Print dialog box and automatically redirect to another page, that's easy too. Change the onLoad attribute to read onLoad="print();window.location='../home.cfm';"

Return to the Cold Fusion Tips-N-Tricks topic list