Tag Archives: design

How to Make Your Internet Coupons Printable

100_3419cpy

Here is some handy code to add to your website to make it easier for your customers to print your internet coupons. It allows them to print only the coupon image and not the rest of the page.

Add this javascript in between the <head> tags:

<script language=”JavaScript”>
<!–
function print_iframe(frame_name) {
var iFrm = frames[frame_name];
if (iFrm) {
iFrm.focus(); //IE requirement
iFrm.print();
}
}
//–>
</script>

Add this iframe code where you want your coupon:

<iframe src=”YOUR COUPON IMAGE LOCATION” name=”x11″ id=”x11″ width=”WIDTH” height=”HEIGHT” marginwidth=”0″ marginheight=”0″ align=”middle” frameborder=”0″></iframe>
<br><a href=”javascript:void print_iframe(‘x11’)”>Print This Ad</a>

Make sure you put the image’s width and height in the iframe code so the coupon will show up without any funky borders or scrolling.

Here is an example of the script in use:
http://insideedgeskiandbike.com/retail.cfm

Give it a try. More scripts to come!