Hello everyone!
I have a problem with using an object by it's name.
I have a list of layers for example and from menu i'm chosing one of it by name. For example
<div id="city1"....>
...
</div>
and i'm chosing from dropdownlist item "city1"
somestr = dropdwonlist1.selecteditem.value;
i need to make this somestr as a name of an object and then to change some it's properties:
city1.style["visibility"] = "visible"; for example.
But how to write it?
somestr.style.. - that will be a mistake.
If someone knows how to do that, i'll be very thankful for help!
Best regards,
Alexander
I have a problem with using an object by it's name.
I have a list of layers for example and from menu i'm chosing one of it by name. For example
<div id="city1"....>
...
</div>
and i'm chosing from dropdownlist item "city1"
somestr = dropdwonlist1.selecteditem.value;
i need to make this somestr as a name of an object and then to change some it's properties:
city1.style["visibility"] = "visible"; for example.
But how to write it?
somestr.style.. - that will be a mistake.
If someone knows how to do that, i'll be very thankful for help!
Best regards,
Alexander