Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Need help creating simple Select All checkbox
System
I have an incredibly simple task for a DCT form and just can't see why this is not working.
The script is very basic. It is triggered via an init script whenever any checkbox has a state change.
function fnHandleCarType(item) {
var arOptions = item.getOptions();
for (i=0; i<arOptions.length; i++) {
if (arOptions
.value == "all") {
if (arOptions
.selected) {
var changeState = true;
}
}
if (changeState) {
arOptions
.selected=true;
}
}
}
I've used alerts to try to figure out why this doesn't work. And, all I can see right now is that the arOptions
.selected change from true/false just doesn't ever happen on the form. I know I must be missing something incredibly obvious but I just don't see it.
I'm using TeamSite 6.7.2.0.
Thank you for any help on this.
Stefanie
Find more posts tagged with
Comments
Migrateduser
A co-worker fixed. I'm posting here in case anyone else is interested. For something so simple, this just didn't strike me as the fix.
if (changeState) {
item.setValue([0,1,2,3,4,5,6,7,8,9,10]);
}