0

I used a javascript function. It includes form.reset(). It is working finely most browser except in firefox. In firefox, the most of controls are clear but not included hidden fields. I want to clear hidden field in reset. I don't want to use looping. How to do this?

user113716
  • 318,772
  • 63
  • 451
  • 440
zanhtet
  • 2,040
  • 7
  • 33
  • 58

1 Answers1

1

Form.Reset doesn't clear the hidden fields. You can use Jquery as suggested in this post:

javascript: True form reset for hidden fields

Community
  • 1
  • 1
Madhur Ahuja
  • 22,211
  • 14
  • 71
  • 124
  • I not want to use looping because the form had many hidden fields. – zanhtet Dec 24 '10 at 03:47
  • Why? Because it will take a long time? I doubt that the user will notice... I could understand your concern if this were happening at the same time as a bunch of other stuff, but unless there are thousands of fields, this will be fast enough. Anyhow the solution is at the bottom of that link: use "display: none". – Hemlock Dec 24 '10 at 15:25