SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict Bloodfest's Avatar
    Join Date
    Feb 2006
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  2. #2
    SitePoint Evangelist
    Join Date
    Mar 2007
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you say "separate" does that mean the "subsystems" list is -or- isn't bound to a cfc already?

  3. #3
    SitePoint Addict Bloodfest's Avatar
    Join Date
    Feb 2006
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The subsystem is not bound to a cfc.. just a standard lkpQuery

  4. #4
    SitePoint Evangelist
    Join Date
    Mar 2007
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  5. #5
    SitePoint Addict Bloodfest's Avatar
    Join Date
    Feb 2006
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I accually used a variation of a script you had given me before on a different post.

    Code:
    <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})">

  6. #6
    SitePoint Evangelist
    Join Date
    Mar 2007
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, good. I couldn't remember if you could use "bind" directly in the list or if needed to use something like cfajaxproxy.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •