Display:none based on <cfselect>

I have multiple selects bind to a cfc.

I also have a seperate select that I would like to make disappear based on the value of one of the bound selects.

<cfselect “partnumber”>

<cfselect “serialnumbers”> - based on partnumber select

<cfselect “subsystems”> - I want this entire select box to display:none if the partnumber is eq 0

Thanks in advance

I accually used a variation of a script you had given me before on a different post.


<script>
	subsytemState = function(partnumber) {
		var elem = document.getElementById('subsystem');
		if (partnumber != 0)
		{
			elem.disabled = true;
		}else{
			elem.disabled = false;
		}
	}
</script>

<cfajaxproxy bind="javascript:subsytemState({partnumber})">

No idea if it’ll work, but have you tried binding subsystems to partnumber via a javascript function and inside it changing the visibility of the list?

Ok, good. I couldn’t remember if you could use “bind” directly in the list or if needed to use something like cfajaxproxy.

When you say “separate” does that mean the “subsystems” list is -or- isn’t bound to a cfc already?

The subsystem is not bound to a cfc… just a standard lkpQuery