• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 68. Working with Form Widgets > Working with Generic Buttons

Working with Generic Buttons

Generic buttons (see Figure 68.1) are clickable, but they don't do anything when the visitor clicks them, unlike submit and reset buttons. You must specifically program these buttons to do what you want them to do, which is usually to launch a JavaScript function. The button's input tag takes the onClick event, where you put the name of the function that you want to launch.

Listing 68.1. View Source for Figure 68.1.

<form>
  <input type="button" name="totalButton"  value="Calculate Total" onClick="doTotal();">
</form>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint