Samisite Webmaster Community Forum
General Category => General Discussion => Topic started by: Bighousedaddy on January 25, 2008, 07:50:51 PM
-
Hi everyone, Does anyone have a SIMPLE download javascript code, and a SIMPLE print page javascript?
Thanx, Ken aka Bighousedaddy <><
-
Simple Print page?
This one creates a button and when clicked prints the page.
When put onto a FRAMED page, it will send only the part of the page with the button.
<input type="button" name="printMe" onClick="print()" value="PRINT PAGE">
</form>
SIMPLE download javascript code? Don't know what you mean.
Usually the standard is to give the instruction to right click, save target as....
-
The download is for a pdf file... and the print page is a htm I'm looking for script where I can use my own buttons if possible. if not, a scripts the creates it own button so they match.
Ken akak Bighousedaddy <><
-
You want to make images? Then put them into buttons?
Do they need to be rollover? or flat?
If flat, you can make ANY image a button.
Then you just use a URL style link within CSB to point to the PDF file. You can set it to open in a NEW browser window.
Or rollover buttons....Lots of ways to make them. Photo programs can create rollover buttons.
This script is for a single button (http://www.samisite.com/photo/id138.htm).
Even online button makers...
One I found (have not tried code yet) is on this page (http://www.wilsoninfo.com/rollgen1.html). Here's a sample of the code it generates. Looks ok but have not tried it or made a sample of it.... Below is a sample of the code it generates.
<!-- TWO STEPS TO INSTALL PRELOAD IMAGES:
1. Paste the first into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Free JavaScript Rollover Buttons from -->
<!-- http://www.wilsoninfo.com -->
<!-- Begin
image1 = new Image();
image1.src = "down1";
image2 = new Image();
image2.src = "down2";
// End -->
</script>
</HEAD>
<!-- STEP TWO: Insert this code into the BODY of your HTML document -->
<BODY>
<a href="http://www.samisite.com" onmouseover="image1.src='down1';"
onmouseout="image1.src='up1';">
<img name="image1" src="up1" border=0></a>
<a href="http:/www.samisite.com/forum" onmouseover="image2.src='down2';"
onmouseout="image2.src='up2';">
<img name="image2" src="up2" border=0></a>
</BODY>
Or use text link as noted before