Hierarchical drop-downs in Dovetail Agent

Last post 07-09-2008, 4:46 PM by gsherman. 2 replies.
Sort Posts: Previous Next
  •  07-09-2008, 2:13 PM 11353

    Hierarchical drop-downs in Dovetail Agent

    I have been using the Hierarchical drop-downs in Dovetail Agent code Gary Sherman posted. This has been working great. Now I must move over a customization to cr.asp that uses multiple user defined popup list triggering off of level 1 of the first.

    List one "CR Products" has three levels. L1 is Product, L2 is Module and L3 is Sub Module. This part works great.  I have 3 more dropdowns that must update based on the value in L1 (Product).

    List two "CR Product Areas" has two levels. L1 is Product (sames as list one), L2 is Area.

    Lists 3 and 4 are two level lists just as list two with L1 being Product.

    I need lists 2 through 4 updated anytime L1 of list one is changed. So far I have been unable to figure out a way to do this. It seems that the onchange does not fire on the <select></select> used by the helper code. I am populating these first during body onload. Now I must update lists 2 ~ 4 when the product is changed.

    Thanks

     

  •  07-09-2008, 3:46 PM 11354 in reply to 11353

    Re: Hierarchical drop-downs in Dovetail Agent

    Nevermind.

    After much head banging and bleeding from the ears I figured out how to make this work. Tongue Tied

  •  07-09-2008, 4:46 PM 11355 in reply to 11353

    Re: Hierarchical drop-downs in Dovetail Agent

    Using jQuery, you can easily append to the existing onChange event for that first element.

    For example:

    $('#cpu').change( function() { alert("Hello"); } );

    The existing onChange event (that forces the down-level lists to change) will still occur, and now you can change the others elements as well.

    Perhaps something like:

    $('#CR_Products_Level1').change( function() {
       var product = $('#cpu').val();
       $('#CR_Product_Area_Level1').val(product).change();
    } );

     

    Hope thie helps.


    ---
    Gary Sherman
    gary@dovetailsoftware.com
View as RSS news feed in XML