Steve,You were right about setting it in the MXD, thank you. I've run into one more issue... this piece of code...:function addChecklist(fLayers){
var items = dojo.map(fLayers.layerInfos, function(info,index){
if (info.defaultVisibility) {
visible.push(info.id);
}
return "<input type='checkbox' class='list_item' checked='" + (info.defaultVisibility ? "checked" : "") + "' id='" +
info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>" + "<br />";
});
...doesn't exactly work because no matter what value I've set for the <checked= > attribute of the <input> object, it sees it as true. From my testing, simply have the <checked> attribute in the <input> tag at all sets the default value to 'checked'... so for instance these two lines are the same, resulting in a checked box from the start:[HTML]<input type='checkbox' class='list_item' id="a" checked="checked"/><input type='checkbox' class='list_item' id="b" checked=""/>[/HTML]Does anyone know if there is a value that can be set in the <checked> attribute so that the default is set to not being checked?Thanks,DREDIT: I skirted the issue with the code below, but I'm still interested to know if there's an value that would set the checked to false.function addChecklist(fLayers){
var items = dojo.map(fLayers.layerInfos, function(info,index){
if (info.defaultVisibility) {
visible.push(info.id);
return "<input type='checkbox' class='list_item' checked='" + (info.defaultVisibility ? "checked" : "") + "' id='" +
info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>" + "<br />";
}
else {
return "<input type='checkbox' class='list_item' id='" +
info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>" + "<br />";
}
});