On the radio button...

Onclick="document.myform.mytextfield.value='';"

If you are saying you want to clear both text fields....

Onclick="document.myform.mytextfield.value='';
document.myform.myothertextfield.value='';"



-----Original Message-----
From: Doug Brown [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 21, 2006 3:34 PM
To: CF-Talk
Subject: Javascript help

I have a form with 2 text fields and some radio button, and what I would
like to do is clear any text in the text fields if any of the radio buttons
are selected. I can do this with one text field, but not sure how to work it
with two

This will work with one text field...

 <input type="text" name="Aquantity" size="5" maxlength="6" <cfif
ClassAdDetails.quantity_option eq
"quantity">value="#ClassAdDetails.AQuantity#"</cfif>>

<input type="radio" name="quantity_option" value="always_in_stock"
onFocus="document.updClassified.Aquantity.value = ''">



But.....Say just one of these text fields have a value, how can I clear
either one when I click on any one of the radio buttons.

 <input type="text" name="name1" value="#value#">
 <input type="text" name="name2" value="#value#">


<input type="radio" name="quantity_option" value="always_in_stock"
onFocus="?">
<input type="radio" name="quantity_option" value="always_in_stock"
onFocus="?">
<input type="radio" name="quantity_option" value="always_in_stock"
onFocus="?">


Doug B.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264806
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to