我无法在我的模态对话框中检查/取消选中Google Chrome中的任何复选框,并且在初始加载对话框时在IE中它可以正常工作,但如果关闭对话框并使用完全相同的数据重新打开,甚至重新打开 - 运行代码以填充对话框我也无法选中/取消选中复选框。我已经尝试过我读过的其他线程的z-index修复,这解决了最初在IE中无法检查任何方框的问题,但在Chrome中它仍然存在。
我动态创建的代码是
<div id="IndividualReports" class="ui-dialog ui-widget" style="height: auto !important; width: 725px; background-color:white; border: 1px solid black;">
<div class="ui-dialog-titlebar ui-widget-header " style="background-color: #00447B; height:50px; text-align:left; vertical-align:middle; padding:13px 0px 0px 25px;">
<span id="ui-dialog-title-dialog" class="ui-dialog-title" style=" font-size: 20px; color: white;">Processed 1-Clicks</span>
</div>
<div style="width: 698px; height:25px; text-align:right; padding:5px 20px 5px 5px; background-color: white;">
<a href="#"><img src="/applications/images/Refresh.gif"/>Refresh</a>
</div>
<div id="indOrdersList" style="width: 698px; height:350px; display:block; padding:5px 10px 5px 15px; background-color: white;">
<table style=\'width: 685px;\' cellpadding=\'0\' cellspacing=\'0\'>
<tr>
<td style=\'width:20px;\'><a href=\'#\' class=\'toggleReportTwo\'></a></td>
<td style=\'width:315px; text-align:left; font-weight:bold;\'>Sample Report Two</td>
<td style=\'font-weight:bold; width:140px; text-align:right;\'>10/3/2013,9:52:40 AM</td>
<td style=\'font-weight:bold; width:150px; text-align:left; padding-left:6px;\'>
<a href=\'#\' class=\'viewIndReports\'>View All in One PDF</a>
</td>
<td style=\'width:70px;\'>
<input type=\'checkbox\' id=\'delAllSampleTwo\' class=\'delAllSampleTwo\'/>All
</td>
</tr>
</table>
<div id=\'sampleTwoReports\'>
<table style=\'width: 685px;\' cellpadding=\'0\' cellspacing=\'0\'>
<tr>
<td style=\'width:20px;\'></td>
<td style=\'width:315px; text-align:left;\'>CHIN KIM</td>
<td style=\'width: 140px; text-align:right; padding-right:4px;\'> </td>
<td style=\'width:150px; text-align:left; padding-left:6px;\'>
<a class=\'viewIndReports\' href=\'#\' target=\'_blank\'>View</a>
</td>
<td style=\'width:70px;\'>
<input type=\'checkbox\' id=\'delCHIN KIM\' class=\'delTwo\'/>
</td>
</tr>
</table>
</div>
</div>
<div style="height:75px; width:700px; background-color: white; vertical-align: bottom; text-align: right; padding-right: 20px;">
<input type="button" class="CommandButton" style="width:100px;" value="Delete Report(s)" onClick="deleteOneClickReports();"/><br/><br/>
<input type="button" class="CommandButton" style="width:56px;" value="Close" onClick="closeIndReports();"/>
</div>
</div>
$('.delAllSampleTwo').live('click',function(){
if($(this).is(":checked")){
$('.delTwo').prop("checked",true);
}else{
$('.delTwo').prop("checked",false);
}
});
我知道我没有使用.delOne和.delTwo类名创建的单个复选框的实时click()函数,我是否也需要这些?我只想知道一个复选框应该可以检查。 谢谢你的帮助, 尼克G