Link to home
Start Free TrialLog in
Avatar of traport
traport

asked on

Select OnChange Visibility

If I change this select box (projDivisionID) in any way, how can I display the  textarea and label  (projDivisionComment) and otherwise hide it?
<select name="projDivisionID" onKeyDown="typeAhead();" style="width: 125px;">
  <cfloop query="getDivisions">
    <option value="#unitDivisionID#"<cfif #projDivisionID# EQ  #unitDivisionID#>selected</cfif>>#divisionName#</option>
 </cfloop>
</select>

Comment:<br>
<textarea style="width: 470px;" name="projDivisionComment"><cfif projDivisionComment neq ''>#projDivisionComment#</cfif></textarea>

Open in new window

Avatar of Audhi203
Audhi203

Try something similar to this: You can also pass variable and add if-else in javascript function to make visible true/false
<select onSelectionChange="javascript:ChangeText()>

functionChangeText()
{
var id = document.getElementbyName('txtArea');
id.Visible = false;
}
ASKER CERTIFIED SOLUTION
Avatar of alien109
alien109
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of traport

ASKER

Thank you!