SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reset Button in Dynamic Form sets all fields as blank (in IE)

    Hello all,

    I'm creating a dynamic form with pre-defined values in the textfields, and would like to use a reset button to reset all the textfields to their pre-defined values. However, when I click on the reset button (in IE), it clears the entire form!

    With plain HTML, if a textfield has a pre-defined value, and that value has changed, the reset button would revert to the pre-defined value. This is also true with my dynamically-created form in Firefox.

    Do you guys know of a way to make this work in IE?

  2. #2
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when you define the value, also define the same value as the defaultValue.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mrhoo,

    Excellent! That did the trick... many thanks for the solution!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •