gif image print button

I use this code to print the main frame on my page:

<form name="PrintA">
<p align="center">
<input type="button" name="PrintB" value=" Print " onClick = "parent.main.focus(); parent.main.print()">

I would like a gif image instead of the ugly "button."  Could you please help me fix this code???

Thank you,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

try this..

<img src="yourimage.gif" onClick = "parent.main.focus(); parent.main.print()">
Jeter2ssAuthor Commented:
that works, thx monvelasquez!

is there a way to modify that code so that when the user prints the page, the header and footer do not show?  i don't want the address and page numbering to be shown.

thx again
I'm not sure if that can be controlled using javascript because it's a browser setting.

for example in Internet Explorer, you open up File > Page Setup
you then need to clear up the Header and Footer fields.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

> is there a way to modify that code so that when the user prints the page, the header and footer do not show?

You can keep page elements form being printed by using CSS:

@media print {
  .header, .footer  { display:none; }

>  i don't want the address and page numbering to be shown.

If you're talking about anything added by the browser that's not actually in your pages, there's nothing you can do about that -- it's strictly under user control.
Also, if you're concerned with older browsers, use

<a href="javascript:parent.main.focus(); parent.main.print();"><img src="yourimage.gif"></a>
Jeter2ssAuthor Commented:

is there a way to make your code change the picture when clicked???

is better to change the image when you pass over with the mouse not when you click on it becose once you click it, you loose the focus and start doing your tag so you wont really se how it changes.

<a href="javascript:your function();" onMouseOver="document.images['name'].src='your imageOn'" onMouseOut="document.images['name'].src='your imageOff'" onFocus="javascript:this.blur();"><img src="Your imageOff" border=0 name="name"></a>

But you should make all this new questions on different ones and assing the points of the one you asked the first time to monvelasquez

Have Fun.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.