It's not a secret anymore!
The moose likes HTML, CSS and JavaScript and the fly likes Clear email field after submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Clear email field after submit" Watch "Clear email field after submit" New topic

Clear email field after submit

Gene B. Gwx

Joined: Feb 12, 2011
Posts: 3
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>

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

Joined: Jan 10, 2002
Posts: 62771

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gene B. Gwx

Joined: Feb 12, 2011
Posts: 3
Here's all the code. Thanks for taking the time to look into this.

Gene B. Gwx

Joined: Feb 12, 2011
Posts: 3
Updated. Much better now. Thanks.
I agree. Here's the link:
subject: Clear email field after submit