|
|
when the page tries to bind your second cfselect (Activity) to the
Office on, the Offcie cfselect does not have any data yet... so Activity
can't bind to the value of Office select.
try putting the following in the <head> of your page.
this code is adapted from someone's blog (Ray Camden's? - can't recall
now...) - i will try to remember and give proper credit.
IMPORTANT: the code below assumes your FORM's name="test". if you have
changed the name of your form amke sure you change it on line 6 in the
code below, too. Also don't forget to change [script] & [/script] to
proper tags.
<cfajaxproxy bind="javascript:test({Office},'[#form.Office#]')">
[script]
var imfinished = false;
function test(x,val) {
if(!imfinished) {
var dd = document.forms.test.Office;
valArr = ColdFusion.JSON.decode(val);
for(var i = 0; i < dd.length; i++){
for(var j = 0; j < valArr.length; j++){
if(dd.options[i].value == valArr[j]){
dd.options[i].selected = true;
}
}
}
imfinished = true;
}
}
[/script]
hth
---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
|
|