Skip to content Skip to sidebar Skip to footer

Googlemap Api Code On Dropdown And Text Box

How to get the value that is selected in the dropdown box to a text box. I have a text box and a drop down box in which village names are listed.If the selection is changed that va

Solution 1:

This is a Javascript 101 question! I shouldn't answer but ....

<script type="text/javascript">
function selectChange(val)
{
   document.getElementById("text_id").value = val;
}
</script>
<form>
<input id="text_id" value="" type="text" size="10" />
<br />
<select id="select_id" onChange="selectChange(this.value);">
<option value="">-- Select --</option>
<option value="val1">val1</option>
<option value="val2">val2</option>
<option value="val3">val3</option>
</select>


Post a Comment for "Googlemap Api Code On Dropdown And Text Box"