Author Topic: Download and print page code  (Read 3456 times)

Offline hidden

  • Junior Member
  • **
  • Posts: 65
    • leather patterns specifically for the leather craftsman
Download and print page code
« 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 <><
God has a bigger purpose for your life than your biggest problem
<>< Bighousedaddy

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: Download and print page code
« Reply #1 on: January 25, 2008, 08:07:13 PM »
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.

Code: [Select]
<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....
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )

Offline hidden

  • Junior Member
  • **
  • Posts: 65
    • leather patterns specifically for the leather craftsman
Re: Download and print page code
« Reply #2 on: January 25, 2008, 10:35:57 PM »
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 <><
God has a bigger purpose for your life than your biggest problem
<>< Bighousedaddy

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: Download and print page code
« Reply #3 on: January 25, 2008, 11:48:17 PM »
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.

Even online button makers...
One I found (have not tried code yet) is on this page.  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.

Code: [Select]
<!-- 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
« Last Edit: January 26, 2008, 12:03:09 AM by Samrc »
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )