Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: open
Ok, now I have a dropdown list, and what I would like to do is use the onChange method in the <select> tag to somehow run this function... doing onChange="showLayer(layername)" is no bother, however, where I am having a problem is that I want to populate the layerName with the selected value of the dropdown box, eg:
<select name="selectme" onChange="showLayer(this.selected)
Thanks in advance for any suggestions or tips,
<select name="selectme" onChange="showLayer(this)">
and then in showLayer
Typically, having just posted the topic I solved the puzzle!
OK, the swapLayer() finction is contained in an external JS file (where the following code is about to be moved to also!).
<select name="mlist" onChange="showListLayer()">
<select name="mlist" onChange="showLayer(this.options[this.selectedIndex].value);">
Much neater by far!