javascript print function in a PERL script
Greetings:
I have a Perl script that automatically inserts a message into a page when it is loaded. The current statment looks like this:
code:
$Input{'step'} = "Step 3 of 3 - Print This Page!"; [/code] In the web page, the above message is inserted wherever I indicateQuote: <!-- STEP -->Quote: I would like to replace this statement with something like:code:$Input{'step'} = "<SCRIPT><!--\n" if (window.print) { document.write('<form>Do not forget to ' + '<input type=button name=print value="Print" ' + 'onClick="javascript:window.print()"> this page!</form>');} // End --> </script><NOSCRIPT>Don't foget to PRINT this page!</NOSCRIPT> [/code] This way the user will get the JavaScript print button that will bring up their local print driver. When I try the above code, I get 500 error back from the server. I proably have forgotten something simple, but can't get what it might be. Any help is greatly appreciated. ."//--></SCRIPT>;