Re: reset select-tag only
- From: "Matt Kruse" <newsgroups@xxxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 11:44:13 -0500
google@xxxxxxxxxxxxxxx wrote:
> is it possible to reset a SELECT-Tag to it's default value but not
> reset all other form fields?
Yes. You need to loop through all the options, and check if each has
defaultSelected==true. If it does, select it.
Or, using my functions from http://www.mattkruse.com/javascript/validations/
you could just do:
var sel = document.forms["myform"].mySelectElement;
setInputValue(sel,getInputDefaultValue(sel));
--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
.
- Follow-Ups:
- Re: reset select-tag only
- From: google
- Re: reset select-tag only
- References:
- reset select-tag only
- From: google
- reset select-tag only
- Prev by Date: Re: firstNode problems
- Next by Date: (!stay) in a tutorial
- Previous by thread: Re: reset select-tag only
- Next by thread: Re: reset select-tag only
- Index(es):
Relevant Pages
|