Change href parameter using jQuery after select change
<p>I need to change a couple of href parameters using jQuery and driven by two form select options. The below example works perfectly but is driven from a text input and having problems converting it to work with a select.</p>

<p><a href="http://stackoverflow.com/a/6540265/460322">http://stackoverflow.com/a/6540265/460322</a></p>

<p>I know this shouldn't be too hard but I have a stinking cold and brain is like mush this morning!</p>

<p>My code so far that doesn't work:</p>

<pre><code>$(window).load(function(){

function updateNameValue() {
    $('#changelink').val($('#option1 option:selected').attr('href', function(i,a){
        return a.replace( /(field16=)[a-z]+/ig, '$1'.target.value ));
    });
});

$('#option1').change(updateNameValue);

updateNameValue();
});
</code></pre>
