I used this 

        <CFWDDX
                        ACTION="CFML2JS"
                        INPUT="#getProd_list#"
                        TOPLEVELVARIABLE="getProd_list">
        
        function partlist(thisInfo){
                document.all.PartList.options.length = 0;
                var olen = 0;
                for (var i=0;i < getProd_list.p_num.length; i++)
                {
                        if (getProd_list.m_mscode[i] ==
thisInfo.options[thisInfo.selectedIndex].value){
                                NewOpt = new Option;
                                NewOpt.value = getProd_list.p_num[i];
                                NewOpt.text = '(' + getProd_list.p_num[i] +
') '+ getProd_list.p_name[i] ;
                                document.all.PartList.options[olen++] =
NewOpt;
                        }
                }
        }


the partlist function is called when a product is selected. It will loop
through the list and get all the parts for that product.

Hope this help!

Thanh

-----Original Message-----
From: James Taavon [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 11:31 AM
To: CF-Talk
Subject: OnSelect Javascript code


I am looking for a onSelect javascript code that has the same type of
ability as the popular CFTwoRelatedSelects Custom Tag. Basically I want
"field 2" to change dynamically from the selection of "field 1". Both fields
are being populated from the database. Anybody got something like that?


James

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to