#native_company# #native_desc#
#native_cta#

Creating a Printer Version Grab Method Page 10

By Jim Fletcher
on April 1, 2004

The randomname() function creates a random name for the opened window.
This helps prevent some cache issues.
function randomname(str)
{
	var ret = new String("");
 	var ch;
 	for (var i = 0; i ');
document.write('<table border="0" cellspacing="0" 
cellpadding="0"');
document.write('<tr><td align="middle" valign="top">');
var link = "<a name='printerversionlink' href='#' 
onClick='javascript:showprinterversion("" + company 
+ "", "" + button + "");
' target='_self'>";
document.write (link);
var btn = "<img name='printerversionbutton' 
src='http://www.yourdomain.com/print/print" + button 
+ ".gif' border=0>";
document.write (btn);
document.write('</table>');
}
Testing it out
In the end you should have the following files:
/print/print.php
/print/print.js
/print/1.html
/print/printmain.gif
I also include some images to use in the template:

/print/clickheretoprint.gif
/print/closewindow.gif

the sample SQL needed to set up your database:

SQLsetup.txt

and an example page that shows how to use the include and exclude tags:

example.html
Good luck!
Jim Fletcher ??
www.JimFletcher.net

 

1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10