tags:

views:

80

answers:

1

Hello

How do you post a form in mvc when changing the value of a droplist? do I have to add attributes or is there some inbuilt thing?

Thanks

/M

+3  A: 

Can't you do something like this, nice and clean:

<script>
document.getElementById('mySelect').onchange = function() {
    document.forms[0].submit();
};
</script>


<form method="post">
    <select id="mySelect">
        <option>foo</option>
        <option>bar</option>
    </select>
</form>
karim79
+1 for not using jQuery in your answer
Jan Jongboom