In some browsers, you can set a text field to readonly.  However, for a
version that is cross-browser, I would look at hiding/showing layers based
on what the value of the select box.

---
Billy Cravens

----- Original Message -----
From: "Paul Ihrig" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 12:26 PM
Subject: Disable form field based on select box


> hello all!
> i have a select box called <select name="Contract_Type">
> i would like to Disable a text field called
> <input type="text" name="Contract_Amount"
>
value="<cfoutput>#DollarFormat(RS_Update_PG2.Contract_Amount)#</cfoutput>">
> if the selecton in the select box IS
> <option value="Open Hourly">
> but leave the text field enable if it is not selected
>
> I have tried this, but it dosnt seem to work
>
> <select name="Contract_Type"
>                 onChange="<CFIF value IS "Open Hourly">
> <input diasabled type="text" name="Contract_Amount">
> <CFELSE>
> <input diasabled type="text" name="Contract_Amount"
>
value="<cfoutput>#DollarFormat(RS_Update_PG2.Contract_Amount)#</cfoutput>">
> </CFIF>">
>
>
> any help would be great!
> -paul
> 
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to