I’m having some issues retrieving a single variable…
i have a drop down box part of a form control a div layer that shows once the drop down has been changed.
The variables in the drop down change are for the layer id and the value of the town.
My issue is getting the town id pulled over to the div layer’s link.
This is the code for the switch which is in my head.
[CODE]<script language=”javascript”>
function showhide(id,towns){
var town = towns;
if (document.getElementById){
obj = document.getElementById(id);
if (obj.style.display == “none”){
obj.style.display = “”;
} else {
obj.style.display = “”;
}
}
}
</script>
Here is my div currently where I am trying to pull the town id:
[CODE]
<div style=”display: none;” id=”script”>
<img src=”sac.jpg” border=”0″><br>
<script language=”javascript”>document.write(town);</script><input type=”button” name=”category4″ value=”40″ onClick=”submitform();”> BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH
<br><br>
</form>
</div>
Anybody have a suggestion?