This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 15376
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
Similar Threads
html text box issues
Problem in Reset button.
Resetting fields in a form via radio button selection in a JSP
Regarding combo-box
setting initial value of combobox