make alert for top layer .. what`s the error ?
i need to make alert for top layer if his name start with 3 str ..but any active layer change alert for example this code but not working for me it`s show one alert only
if (doc.activeLayer[0]=_layers[i].name.substr(0,3) == "nav"){
alert("cool")
}else{
alert("notcool");
}