Selective "Clear Form" Button

J

Jason Penny

Good Afternoon all! I have a form that has been developed
using Frontpage 2000 and it has 15 text input boxes. I
want to have a 'Clear' or 'Reset' button, however I need
to be able to specify which input boxes to clear or
reset. I don't want to clear every input box on the form.
Suggestions? Links? Thanks a Bunch!
 
J

Jim Buyens

-----Original Message-----
Good Afternoon all!
Howdy.

I have a form that has been developed
using Frontpage 2000 and it has 15 text input boxes. I
want to have a 'Clear' or 'Reset' button, however I need
to be able to specify which input boxes to clear or
reset. I don't want to clear every input box on the
form. Suggestions? Links? Thanks a Bunch!

You would have to program this in JavaScript or some
server-side prgramming environment.

For example, in JavaScript, you would code the button:

<input type="button" name="btnClear" value="Clear Form"
onclick="ClearForm();">

and then add a script:

<script>
function ClearForm(){
document.forms[0].txtName.value = "";
document.forms[0].txtCity.value = "";
document.forms[0].txtShoeSize.value = "";
}
</script>

where txtName, txtCity, and txtShoeSize are the names of
form fields.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top