Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rendering buttons 1

Status
Not open for further replies.

jimmyshoes

Programmer
Jun 1, 2008
132
0
0
GB
i want to create some nice looking buttons!

Is it a bad idea to use images for buttons
For example
Code:
<a href="somefile.html" onclick="document.myform.submit();return false;"
><img alt="Submit" src="submit.gif"></a>

Is it better to style <input type="submit"> ?

 
2 things:

1. if for any reason a user disables Javascript your submit button will no longer work.

2. If your form processing script expects the existence of the submit button value to process the form, it will submit the form but no processing will take place.

You can of course use an image input type.
This creates an actual submit button with an image you can control.

Code:
<input type=image src="mybutton.jpg">

And requires no JS to work.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top