clearing forms that have non-blank defaults

Kenneth Irwin kirwin at wittenberg.edu
Tue Feb 13 13:32:58 EST 2001


Hi folks,

Is there a good way of clearing form <input type=text> fields that have
initial values other than value="" ?
The reset button will reset a form to the default value, but not clear
fields that started out with a value.

For example, the following is a copy of the output from a search function:
http://userpages.wittenberg.edu/kirwin/av-output.html
Once a search is executed, a search with 0 results will load with the
search terms re-input into the search fields so they can be modified. This
is nice enough, but if the user decides to try a completely different
search, one or more fields would have to be cleared.

It seems to me that there must be a way to use the JavaScript "onReset"
event to clear the fields, but I haven't figured it out. Does anyone have a
clue how this would work - either with JS or with some other tool?

Thanks
Ken
Ken Irwin	                            		kirwin at wittenberg.edu
Reference/Electronic Resources Librarian	(937) 327-7594
Thomas Library, Wittenberg University


More information about the Web4lib mailing list