Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listbox visible if a certain character is contained in a nother listb

Status
Not open for further replies.

tamnet

IS-IT--Management
Jun 2, 2005
31
GB
I am trying to have a listbox either visible or invisible based on wether another listbox value contains the letter "d", I have tried to write the following function without success and wondered if someone would take a look and perhaps steer me in the right direction

Code:
<script language="javascript">
function ToggleListBoxDisplay(){
var lstFlute=document.getElementById("lstFlute")
if Right(lstFlute.value= "d")
  lstMiddle.visible = true;
else
lstMiddle.visible = false;
}
</script>

I then call the function like this

Code:
onChange="ToggleListBoxDisplay()"

Regards

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top