I'd like to build a simple url with a query string that works from a dropdown box with javascript/jquery.
Something like this...
<select id="query">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<a onclick="window.location='http://www.website.com/?title=' + $(#query);"></a>
Any ideas?
Change the markup to
<select id="query">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<a id="anchor" href="http://www.website.com/?title=1"></a>
Then add some jQuery
$('#query').on('change', function() {
$('#anchor').attr('href', 'http://www.website.com/?title=' + this.value);
});
that changes the href and adds the selected value to the URL's querystring