Turns out with jquery it's pretty easy. Check it out...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$('a').click(function() { | |
$(this).attr('href', function(i, h){ | |
return h + '?date=' + $('#date').val() | |
}) | |
alert($(this).attr('href')) | |
}) | |
}) | |
</script> | |
</head> | |
<body> | |
<div id="dateDiv"> | |
<select id="date"> | |
<option value="2013-11-01">Nov 2013</option> | |
<option value="2013-10-01">Oct 2013</option> | |
<option value="2013-09-01">Sep 2013</option> | |
</select> | |
</div> | |
<ul id="linkList"> | |
<li><a href="/report/1">Report 1</a></li> | |
<li><a href="/report/2">Report 2</a></li> | |
<li><a href="/report/3">Report 3</a></li> | |
<li><a href="/report/4">Report 4</a></li> | |
</ul> | |
</body> | |
</html> |