Tinaja wrote:
> My tool so far has 3 form fields per record - a "this is
valid" checkbox and 2
> select lists. One for organizations, second for the
contacts associated with
> that org. On load, I bind the org select to a CFC that
attempts a direct
> lookup using the string value of the record, then a
SOUNDEX match. Now, when
> the select list gets loaded, I want to use the first
matched record's ID to
> lookup contacts for that org. How do I tell the second
select list to wait
> until the first one is loaded before doing its lookup,
and to do another lookup
> anytime that value changes? What if I wanted to also
link the lookup
> functionality to the checkbox 's onChange event? I may
want to add a separate
> checkbox so there is one for org and one for contact in
case an org exists but
> the contact doesn't.
>
1) in your contacts cfselect make sure you have specified
bindonload='false' - this will prevent it from loading any
data on
pageload, before an entry in your organisations list is
selected
2) in its bind argument add @change to the bind parameter:
i.e.
bind='cfc:path.to.your.cfc.method({formcontrolname@change})'
- this will
make it re-lookup data on each change in the organisations
list (it may
be that @change is even default event, so you may not even
have to add
it at all... can't remember now if it is change or click that
is default...)
3) how do you want to link your select lists to your check
boxes? what
action should the change in the state of a checkbox trigger?
--
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com