Check out jQuery. This sort of thing would be a snap in jQuery 
(http://jQuery.com).


Doug Brown wrote:
> 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:264825
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