Hi i am trying to create drop down menu with javascript where once i select place i get print out in input box in one will be Latitude of place and in second i will get Longitude. My problem is that i can only do it to output either Lat or Lon into the input so i am wondering is there a way of doing this to get both of them printed? Thank you. Here is my code:
<html>
<script language="JavaScript"><!--
function onChange() {
var Current =
document.formName3.selectName3.selectedIndex;
document.formName3.Lat1.value =
document.formName3.selectName3.options[Current].value;
document.formName3.Lon2.value =
document.formName3.selectName3.options[Current].value;
}
//--></script>
<body>
<form
name="formName3"
onSubmit="return false;"
>
<select
name="selectName3"
onChange="onChange()"
>
<option
value=""
>
Find Place
<option
value = "52.280431"
value ="-9.686166"
>
Shop
<option
value = "52.263428"
value="-9.708326"
>
Cinema
<option
value = "52.270883"
value="-9.702414"
>
Restaurant
<option
value = "52.276112"
value="-9.69109"
>
Hotel
<option
value = "52.278994"
value="-9.6877"
>
Petrol Station
</select>
<br><br>
Lat2
<input
name="Lat1"
type="text"
value=""
>
Lon2
<input
name="Lon2"
type="text"
value=""
>
</form>
</body>
</html