Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Dreamweaver

This chapter is from the book


Looking to spice up a boring form? A common element to all forms is the Submit button—and its standard appearance is definitely commonplace. You can replace the ordinary gray button with a graphic button in one of two ways. If your form has only a Submit button, with no reset or other type of button, you can use an image field. You can add an input image using the Image Field object found in the Forms category of the Insert bar. When users select an image field (that's inside a form), the form is automatically submitted. There is a drawback to using image fields—you can't use them for other purposes, like resetting a form. The second method uses JavaScript. In this technique, you bring in a regular image to act as your Submit button and give it a link like this: javascript:document.form1 .submit(), assuming that your form is named form1. If you want to use another graphic to clear a form, just change the link to javascript:document.form1.reset(). Not only do these types of buttons display the pointing hand icon, but you could also include rollover images if you like.

Figure7.14Figure 7.14

  • + Share This
  • 🔖 Save To Your Account