How do i replace a form submit button to an image?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Owe Blomqvist
Forum Commoner
Posts: 33
Joined: Wed Oct 16, 2002 2:27 pm

How do i replace a form submit button to an image?

Post by Owe Blomqvist »

Hi.
I find these form submit buttons extremely boring.
Is there a way of having an image submiting the form by clicking it?
Rob the R
Forum Contributor
Posts: 128
Joined: Wed Nov 06, 2002 2:25 pm
Location: Houston

Post by Rob the R »

You can use:

Code: Select all

<input type="image" src="button.gif" ...>
If you just want differently-styled text in the button (size, fg/bg color, etc.), you can use a style-sheet, instead. This way, you can make all the buttons on your site look the same to maintain a consistent feel for your users, with the added advantage that you don't have to create a graphic for each button.

I did a quick web search (I love Google) and found this site:
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html
which is a detailed discourse about the pros and cons about using images or style sheets instead of the default submit button.
Owe Blomqvist
Forum Commoner
Posts: 33
Joined: Wed Oct 16, 2002 2:27 pm

Post by Owe Blomqvist »

Thank you very much for the help and the fast reply.
Best regards,
Owe Blomqvist
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

i have moved this to the client side forum cause the topic matter is client side.
Post Reply