Show/hide layer conditional to checkbox and Text Field
Hi, I'm currently using that code to show a layer named PA40. If the box is checked, it will show the layer, if it's not, the layer will close.
var layerName = "PA40";
var layers = this.getOCGs(0&&1);
if (layers!=null && layers.length!=0) {
for (var i in layers) {
if (layers.name==layerName) {
layers.state = !layers.state;
break;
}
}
}
I now wish to use that checkbox to make another thing: if the checkbox PA40 and the Text Field named PIED is 18 or higer, it will show the layer named PA4, and if the Text Field named PIED is lower then 18, it will show the layer PA4L.
I'm a total noob in Javascript.
Thanks a lot
