I have been trying to autoselect an list by it's value with javascript but not succeded. Could anyone help me?
This is the code:
<script>
$("#uppdragstyp-wrapp").val("Städning");
</script>
I have been trying to autoselect an list by it's value with javascript but not succeded. Could anyone help me?
This is the code:
<script>
$("#uppdragstyp-wrapp").val("Städning");
</script>
You need to execute your script when document is ready otherwise your html might not loaded fully at the moment when your script gets executed.
$(function () { $("#uppdragstyp-wrapp").val("Städning"); });
` or `
`, or an `