I have a dropdown list:
<select id="sel">
<option value="1">test1</option>
<option value="2">test2</option>
<option value="3">test3</option>
</select>
And I get the selected value as such:
var e = document.getElementById("sel");
var val= e.options[e.selectedIndex].value;
But what I need is to use the "val" variable in a play framework Scala if sentence like:
@if(svor.rettsvar == val){
<p><b>@svor.svor_texti</b></p>
}
and to make it update if I change the selected value.
Best regards, Björn.