Re: problem with method reset()
- From: GArlington <garlington@xxxxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 06:52:28 -0700 (PDT)
On Apr 28, 12:48 am, artev <mailnotspa...@xxxxxxxxxxx> wrote:
if in a page I have a search form and I want use the method reset()
for reinsert the default values, I notice that after a research, for
the method reset(), the default values aren't more that first time loaded
in the form but that of the form set for the search (I think so);
see that the form is inner the same result's page, pheraphs
the reset() 'see' how default values only the last form and not those
that is loaded initially;
is there some tip?
Method reset() will set all values back to what it was ON page LOAD,
so if you want it to behave the way you describe (if I understand it
correctly) you can:
1) provide your own reset() function
example code
<input type="..." defaultValue="..." value="..." />
....
<input type="reset" onclick="myReset()" ... />
in you function take values from defaultValue attribute and assign it
to value attribute...
2) if you DO NOT want to override the reset() function you can load
the page with default values and set current (search specific) values
in onLoad script, then std reset() will work the way you want...
.
- Follow-Ups:
- Re: problem with method reset()
- From: artev
- Re: problem with method reset()
- References:
- problem with method reset()
- From: artev
- problem with method reset()
- Prev by Date: Re: XHR and responseXML == null why ?
- Next by Date: Re: problem with method reset()
- Previous by thread: problem with method reset()
- Next by thread: Re: problem with method reset()
- Index(es):
Relevant Pages
|