-
I have a certificate that is displayed in the browser window, built from a template with substitutions from a database (formatting will be done in Perl, into which I can imbed javascript).
We want the visitor to be able to print the certificate. If I place the link or button to print the certificate on the page, it (of course) prints out along with the certificate. I'd like to avoid that. Any suggestions? I'm wondering if frames might work here (button in one, certificate in the other. selecting button would print contents of second frame only.) but I'm not too familiar with frames.
Also, if it would be possible, I'd love to be able to avoid printing the URL of the site at the bottom of the page. If that can't be done, so be it - but the print button is an absolute must-have.
Thanks in advance for any suggestions.
Sharon
-
Frames will work well here. Try something like:
.
.
.
</head>
<frameset framespacing="0" border="false" frameborder="0" rows="190,*">
<frame name="framename1" scrolling="no" noresize target="targetframe" src="pagetoloadname.htm">
<frameset cols="110,*">
<frame name="framename2" target="targetframe" src="pagetoloadname.htm" scrolling="auto" noresize>
<frame name="framename3" src="pagetoloadname.htm" scrolling="auto" noresize target="_self">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</body>
</noframes>
</frameset>
</html>
The above is a classic banner, left frame, mainframe layout. The numbers for column= and row= is the size of the columnar or rowbased frame.
You probably want a two frame page. Just delete the left frame.
To not print the url, you might provide instructions to the user to access page setup and change margins, etc. I've not tried it, but it might work.
-
Ok, I believe I could figure out a way to produce that code in the script. Then my print button, which normally would cause a window.print to occur (onClick) would have to reference the lower frame? Would that be something like window.frames[1].print - or what?
As I'm sure you can tell, I'm not any more familiar with javascript than I am with frames -
As for your suggestion for not printing the URL, I may try that some day to see if it can be done, but it won't work for me on this project because the user will see a full screen with no toolbars, menu, etc.
Thanks for your help,
Sharon
June 13th, 2000, 01:20 AM
-
Sorry for not responding earlier. Been busy. Yes. You should be able to print with a line of code as you proposed.
Russ
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by smmorrow:
Ok, I believe I could figure out a way to produce that code in the script. Then my print button, which normally would cause a window.print to occur (onClick) would have to reference the lower frame? Would that be something like window.frames[1].print - or what?
As I'm sure you can tell, I'm not any more familiar with javascript than I am with frames -
As for your suggestion for not printing the URL, I may try that some day to see if it can be done, but it won't work for me on this project because the user will see a full screen with no toolbars, menu, etc.
Thanks for your help,
Sharon
[/quote]