Custom Submit Button
This is probably rather simple to do.
I would like to make an image become a submit button for a JMailer. I've tried to screw around with onClick commands, but I don't think I'm doing it correctly.
Is this even possible? If not, how would I go about creating a custom button that would accomplish this task?
Thanks for your help.
Comments
Custom Submit button
This can easily be accomplished, by using input button and a source for your image, then add an onClick handler which does the form submit (and some additional actions like input validation for example). Or also use CSS, with a class, or inline as the following example:
<input type="button" name="submit" value="SubmitMe" OnClick="sendForm();return false;" style="background-image:url(my_button.gif); width:200px; height:23px; border:0; color:#036;font-family: Verdana; font-weight: bold;" />
Hope this helps
Custom Submit button #2
The solution above is OK if you have to manage other events inside the oNclick event manager.
But if you don't, then a simpler form is quicker:
<input type="submit" value="SubmitMe" style="background-image:url(my_button.gif); width:200px; height:23px; border:0; color:#036;font-family: Verdana; font-weight: bold;" />
Remeber to use the same dimensions of the gif file.
Border may be changed, as well as color and font: use them if you need to put the button in a very high accessible environment: someone may have images disabled. Experiment by yourself.
Enjoy.
You must me logged in to write a comment.