Open a new window in JSF when a user checks a box?
How do I open a new window in JSF when a user checks a checkbox? Here's what I have:
<h:selectBooleanCheckbox title="shipping" value="#{ShippingStationHandler.view}" style="width: 73px; height: 29px">开发者_StackOverflow中文版 </h:selectBooleanCheckbox>
Very unclear but simply;
<h:selectBooleanCheckbox onclick="linkPopup(this)" />
and in script tags
function linkPopup(obj) {
if(obj.checked == true)
window.open('http://stackoverflow.com' ,'Link','height=600, width=800');
}
can be useful for somebody...
精彩评论