我面临一个奇怪的问题。检查复选框时,我确实需要显示一个弹出窗口。它工作正常,但即使在取消选中时也会出现相同的弹出窗口。
<af:objectImage id="agreementCheckBoxImg" source="/base/images/spacer.gif" styleClass="jqTransformCheckbox" onclick="displayPopup(this.id,'main\\\\:content\\\\:Popupregion\\\\:Popup','520px','260px');return false;"/>
<script type="text/javascript">
function displayPopup(buttonId,popId,width,height) {
var eminputSelf = $("#main\\:content\\:check");
if (eminputSelf.attr("checked") == true) { // check box condition works fine
alert('returning do not show popup');
} else {
$('#'+needHelpId).colorbox({ open:true, title:'',innerWidth:interWidth, innerHeight:innerHeight,close:'shutdown', inline:true, href:popId , onOpen:function(){ $(popId ).show();}, onCleanup:function(){ $(popId ).hide();}});
}
}
</script>
取消选中期间警报即将到来,但弹出窗口也即将到来。
请帮忙。提前致谢。