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...
Please stop posting identical queries. In the run of a couple of days
you have posted four nearly identical queries:
memorize form settings
http://groups.google.com/group/comp.lang.javascript/msg/e9a6221ff7eb4e27
memorize all form's setting
http://groups.google.com/group/comp.lang.javascript/msg/0becc3c9df98ef78
regards method reset()
http://groups.google.com/group/comp.lang.javascript/msg/928318271cfc1148
problem with method reset()
http://groups.google.com/group/comp.lang.javascript/msg/b99de1d38692ce5e
That creates broken threads all around: please choose one - possibly
this one - where you will be collecting answers and providing extra
info if asked.
For the question itself it was clearly answered in the very first
thread: use reset().
If reset doesn't work for you than you don't want to restore form's
default values but you are willing to do something else what you
failed to express so far.
problem is that first time I load page I achieve default value with
javascript;
but when I click submit for make search, also the file
javascript is reload so I haven't more my defalut value;
is possible to have static variable in javascript?
> 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...
can explain better?
thanks