Ive a form that have certain input text. all of them has their own reset value..
for example …
<input type="text"
name="<?php echo $row['FieldName'];?>"
id="<?php echo $row['FieldName'];?>"
class="required"
style="font:12px Verdana ; width:250px;"
value="<?php echo $row2[$nameROW]?>" />
<?php }
thus when i use normal RESET function..it will not clear up my form. because of its reset value has been set already…
so how can i totally CLEAR not RESET the form??
If you want to avoid fields being reset to their initial values, you’ll need to actually cycle through all of the input fields, textfields, and select elements, individually setting their values to an empty string, checked properties to false, etc.
You can see an example of what this might look like online at http://www.electrictoolbox.com/javascript-clear-form/, or what a jQuery solution (which is a bit more concise) would look like at http://www.electrictoolbox.com/jquery-clear-form/.