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

Clear email field after submit

 
Gene B. Gwx
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to clear the email text box after it has been submitted and added to a text file. Here's what I have now:

<div class="mailWrap">
<form action="#" name="newsletterForm" id="newsletterForm">
Your E-mail: <input type="text" name="email" id="email" class="newsletterInput" /><br />
<input type="submit" name="Submit" value="Add My E-mail" class="newsletterButton" />
<span class="loader"><img src="loading.gif" alt="loading" /></span>
</form>

Not quite sure how to add a clear command to the email text box. Any help would be greatly appreciated.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is actually processing the form submission? The action value of "#" will simply cause the form to be submitted back to the same HTML page. There's got to be more going on that you are showing us.
 
Gene B. Gwx
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's all the code. Thanks for taking the time to look into this.



 
Gene B. Gwx
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Updated. Much better now. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic