RE: OnSelect Javascript code

2001-12-12 Thread thanh . nguyen

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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: OnSelect Javascript code

2001-12-12 Thread James Taavon

Thanks, I ended up using the ThreeSelectsRealted Tag. Works GREAT!!

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 1:24 PM
To: CF-Talk
Subject: RE: OnSelect Javascript code


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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists