Newbie question.

I am looking for a JavaScript code (other sugestions welcome) so that by clicking on a button of the 'viewed' page, it will print a different page without bringing it up in the browser first.