Problemer med at ændre værdi i en asp streng.
Hej med jer,Mine javascript evner er mildest talt elendige, og har brug for lidt assistance. Jeg har følgende kode, som skal ændre værdien i en ASPstreng (strLufthavn), blot man klikker sig hen på hhv. København el. Billund. Hvordan klarer jeg lige den??
MVH Max
----------- eget sørgelige forsøg -----------
<SCRIPT type="text/javascript">
function Lufthavnen(tekst){
var myindex=tekst.Lufthavn.selectedIndex
if (tekst.Lufthavn.options[myindex].value == "BLL") {<%strLufthavn="BLL"%>}
if (tekst.Lufthavn.options[myindex].value == "CPH") {<%strLufthavn="CPH"%>}
}
</SCRIPT>
<form name="form1">
<select style="font-size:10px; color:#ffffff; background-color:#333333;" name="Lufthavn" onChange="Lufthavnen(this)">
<option value="CPH">København</option>
<option value="BLL">Billund</option>
</select>
</form>
