PDA

View Full Version : Print This Page Function



JustinSurfer
November 30th, 2001, 20:19
Anyone know the JavaScript code for this?

Thanks

Justin

meow
November 30th, 2001, 22:33
Had this.

<script type="text/javascript" language="javascript">
<!--

function printer(){
if (!window.print){
alert("Hit Ctrl+P to blah blah blah.")
return
}
window.print()
}

//-->
</script>


<a href="#" onclick="printer()"><img src="print.gif" border=0></a>

Dusty
November 30th, 2001, 22:41
Ctrl+Alt+P? I thought Ctrl+P was print in everything capable of printing, are there some browsers that use Ctrl+Alt+P?

meow
November 30th, 2001, 22:44
That actually brings up my password manager. :biggrin2:

JustinSurfer
November 30th, 2001, 23:20
Cheers Meow, worked brilliantly :)