Welcome, Guest
Username: Password: Remember me

TOPIC: Add a reset button to clear textbox input

Add a reset button to clear textbox input 9 months 2 days ago #101695

  • boyan
  • boyan's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 49
  • Thank you received: 9
  • Karma: 1
Dear all,

I am trying to add a reset button so that a respondent can clear textbox input and retype without leaving the survey. Here is my code but it doesn't work. Any guidance is appreciated. Thanks!

<input id="reset" onclick="reset()" type="button" value="Reset" />
<script type="text/javascript">
function reset() {
document.getElementById("answer548129X3X1241").value=" ";
document.getElementById("answer548129X3X1242").value=" ";
document.getElementById("answer548129X3X129").value=" ";
}
</script>
The administrator has disabled public write access.

Add a reset button to clear textbox input 9 months 2 days ago #101712

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1067
  • Thank you received: 235
  • Karma: 74
Hi,

A big part of your required code is probably here.
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.
The following user(s) said Thank You: boyan

Add a reset button to clear textbox input 9 months 2 days ago #101714

  • boyan
  • boyan's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 49
  • Thank you received: 9
  • Karma: 1
problem solved. I think I could not use reset which might be a reserved word. After changing reset to formreset, it worked perfectly.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.116 seconds
Donation Image