[eluser]teampoop[/eluser]
Probably your best approach would be to set all of the hidden fields to zero, then assign the selected one the correct value. I am assuming you have the following
Code:
<ul class="the_links">
<li><a href="link" id="link_l">link 1</a></li>
<li><a href="link" id="link_2">link 2</a></li>
<li><a href="link" id="link_3">link 3</a></li>
</ul>
<div class="places">
<input type="hidden" name="link_1" value="0">
<input type="hidden" name="link_2" value="1">
<input type="hidden" name="link_3" value="2">
</div>
Your JS would be something like so:
Code:
$("a", ".the_links").click(function(){
$a = $(":hidden", ".places"); // gets your nodes
$a.each(function(){ $(this).val(0);}); // sets all to zero
$a.find("[name="+$(this).attr('id')+"}").val(1); // finds proper name and sets value
});
Now this is just a quick thought and I haven't tested it, but I think it's on the right track.
HTH