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

JavaScriptHTML

Avatar of undefined
Last Comment
traport

8/22/2022 - Mon
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
alien109

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
traport

ASKER
Thank you!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy