Meaningless Drivel is fun!
The moose likes HTML, CSS and JavaScript and the fly likes Problems in Form reset button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problems in Form reset button" Watch "Problems in Form reset button" New topic

Problems in Form reset button

Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572

I am using a reset button inside a form. When my form is displayed it selects values of some of the comboboxes by default. Suppose if a country combo box is displayed then "USA" will be selected by default. Now when form is displayed then without doing anything I press reset button, it reset all the combo boxes from their default values. I don't want that. If user changes something and presses reset then it should display the default values that were selected before. This is the only case in Combo box if any text field contains any default value and i press reset without doing anything, it will retain its value and not become empty. But in case of combo box it changes I have also tried to use javascript's form.reset() method.

Kindly answer this ASAP.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
then develop your own reset method that changes all of the values to what you want them to be.

I agree. Here's the link:
subject: Problems in Form reset button
It's not a secret anymore!