Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Clearing a form

Posted on 2006-06-25
3
Medium Priority
?
236 Views
Last Modified: 2010-04-09
I have an online I use and is very large and send  alot of information by email.

When some one make a mistake or needs to change a certain part of the form and would like to clear the form of everything exceept certain parts of the form, like Name, address and so on.

Is there a way that if I place a clear bottom that it would only clear certain areas?
0
Comment
Question by:starview
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Expert Comment

by:callrs
ID: 16978968
<html>
<head>
<script type="text/javascript">

function Validate(Form){
alert(Form.I1.value);
Form.I1.value=""
return false;  // to not submit
// return true // to submit
}
</script>
</head>
<form id=F1 action="#" method="POST" onsubmit='return Validate(this)'>
<input id=I1>
<input id=I2>
<input type=submit>
</form>
</html>
0
 

Author Comment

by:starview
ID: 16979095
I guess I am not really folllowing you on this.

Will this only clear certain areas of the form? So they can be re-entered.

Please explain
0
 
LVL 30

Accepted Solution

by:
callrs earned 2000 total points
ID: 16979113
Yes. Dont try to analyze the example yet. First run it. (copy & paste into notepad, save as C:\temp\formtest.htm, then open it in your browser by typing c:\temp\formtest.htm in the address bar)

It will clear the field named "I1", but you can use the function to clear ANY field using the syntax I've given
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question