I've got a flash form that uses the Repeater formitem to create a few
checkboxes that have the same name, like in HTML forms. I've got this
working, and it submits a list of true/false values as expected (I
wish you could submit a list of actual values, like in HTML forms, but
that's another post) but I can't figure out how to access these values
in an event handler. I'm using the script formitem introducted in
7.0.1 so my onClick is calling a function. My function looks like this
so far, but it doesn't work:

function globalSelect():Void {
        if (multiRegionsAllowed() == false && regions.selectedIndices.length > 
1) {
                for (var i:Number = 0; i < regions.getLength()-1; i++) {
                        if (regions.isSelected(i) == true) {
                                regions.getItemAt(i).selected = false;
                        }
                }
        }
}

The checkboxes are named "regions" and the relevant form items are as follows:

<cfformgroup type="repeater" query="regionQuery">
        <cfinput type="checkbox" name="regions"
value="{regionQuery.currentItem.value}"
            label="{regionQuery.currentItem.name}" onclick="globalSelect();" />
</cfformgroup>

The reason I'm using a repeater as opposed to a cfloop is a) the
checkboxes are related and b) they checkboxes are unlikely to change
(though it isn't out of the question) and I want to avoid a recompile
whenever possible. If I alert(regions) I get a list of object
references, so I know that I CAN get at these values, I just can't
figure out HOW! :) Can someone please point me in the right direction?
The Flex documentation hasn't helped.
Thanks!
 - Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234468
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to