Here you go Matthew. You do indeed need a script to make sure values
are cleared, so you can use this script. Just pass in the name of the form
you want to clear and voila!
I wasn't sure how you'd want to handle SELECT lists, so I didn't build it
in, but it'd be easy enough to set the first OPTION to be selected if you
needed to.
================================================
<script language="javascript">
<!--
function clearForm(strFormName){
var objForm = document.forms[strFormName]
var objFormEl
for(var x = 0; x < objForm.elements.length; x++){
objFormEl = objForm.elements[x]
if(objFormEl.type == "text"){
objFormEl.value = ""
}
else if((objFormEl.type == "radio")||(objFormEl.type == "checkbox")) {
objFormEl.checked = false
}
}
}
//-->
</script>
================================================
Hope that helps,
Chris Tifer
http://www.emailajoke.com
----- Original Message -----
From: "Matthew Braden" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Friday, August 30, 2002 2:01 PM
Subject: RE: sticky form fields
Thanks for your help Rob, now is there anyway to allow the reset button to
work with this method? Or create another button that resets the fields to
blank?
>>> [EMAIL PROTECTED] 8/30/02 3:40:08 PM >>>
Use
value="<%=request.form("field1")%>
in your form tags.
Rob Swiger
Webmaster
TCRH.org
Twin County Regional Healthcare
Information Systems
200 Hospital Drive, Galax, VA 24333
PH: 276.238.3515
FX: 276.236.2660
http://www.tcrh.org
[EMAIL PROTECTED]
GO HOKIES!!!!!!!!
-----Original Message-----
From: Matthew Braden [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 4:38 PM
To: ActiveServerPages
Subject: sticky form fields
I have a form that enters data into a database. When I click on submit the
data gets pushed to the db but all of the form fields clear. Is there an
easy way to keep the form fields populated?
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
Confidentiality Notice: This email message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply email and destroy all copies of the original
message.
---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]