开发者

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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜