Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:reset - Not working as I expected

 
Tim Manchester
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,

I added the tag <html:reset /> to a page and I see the button, but when I have the page loaded in a browser, the button does nothing. Am I supposed to supply code to clear out the other elements of the form?

Regards,

- Tim Manchester
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
reset buttons do not clear values, they reset values to the defaults (the values the page loaded with). The only times it should clear all values is when the page loads with nothing in the fields.
 
Tim Manchester
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hrmmm.... Well, the page initially loads with no values in the two edit controls and the reset does not do anything. You mention that reset sets the controls to a default state. How does one set the default values? I tried to create a constructor for the form and put blank strings in the two edit controls but that didn't work either.

Regards,

- DM_Tim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic