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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace form buttons with graphics

Status
Not open for further replies.

robrichardson

Programmer
Joined
Mar 14, 2001
Messages
86
Location
GB
This should be an easy one as its everywhere

I need to replace the standard form buttons with jpgs buttons, these jpgs need to be able to submit the form and reset the form

If someone could show me a small example of how this is done I would be most grateful

Regards

Rob
 
Hello Rob!

1) Put cursor in the place where the image button should be;
2) Insert > Form Objects > ImageField;
3) Select the image;
4) Presws OK.

That's it! Now everytime you (or your site visitors) press on the image button the form will be submitted. Good Luck! :-)
 
Superb!! That works

How would I do the same for a reset button?
 
Here how I did it:

<a href=&quot;JavaScript:(confirm('You are about to reset the form and lose everything you have typed ! \nAre you sure you want to reset the form?'))?document.form1.reset():window.focus();&quot;><img border=&quot;0&quot; name=&quot;imageField2&quot; src=&quot;img/reset.gif&quot; width=&quot;65&quot; height=&quot;22&quot; onClick=&quot;&quot;></a>

This just a basic image link which generates JavaScript that does two things:

1) ask if user really want to reset the form (I did it specially 'cause if you accidentally hit this button the form will be cleared and will lose everything you have carefully entered for last 5 minutes :))

2) resets the form

Just change image code in my example (I marked it bold).
Say if you liked it :) Good Luck! :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top