So far I haven't been able to find a clear answer on SO, so if this has already been answered, please direct me to it if possible.
What I have:
(HTML)
<span class="btn-group" data-toggle="buttons-radio">
<button id="btn1" onClick="$('#theTest').val('price');" type="button" class="btn" value="price">Price</button>
<button id="btn2" onClick="$('#theTest').val('time');" type="button" class="btn" value="time">Time</button>
<input name="theTest" id="theTest" type="hidden" value=""/>
</span>
When a button is clicked, I need to call a function in the backing bean with the value of the clicked button, ie the value of #theTest
How do I do this? I can't call it from javascript, because I am using JSF, and the #{}
tags don't work with javascript.