Radtreeview发出警报应该选择一个类别,甚至选择它 [英] Radtreeview giving alert should select a category even its selected
本文介绍了Radtreeview发出警报应该选择一个类别,甚至选择它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在java脚本中遇到了一个问题,即使我通过选择 selecAll 复选框选择了所有节点错误。
我的代码如下:
Hi ,
I got an issue in java script, even though i selected all the nodes by selecting the selecAll checkbox iam getting error.
My code is as below:
<script type="text/javascript" language="javascript">
//Check for empty categoryid
function CheckForEmptyCate() {
var tree = $find("<%= categoryTreeView.ClientID %>");
if (Page_ClientValidate()) {
if (tree.get_checkedNodes().length == 0) {
alert("Please select atleast one Category.");
return false;
}
}
}
</script>
和iam使用下面的代码选择所有节点
and iam using below code to select all the nodes
<script type="text/javascript" language="javascript">
function checkUncheckAll(chk){
//alert("test");
$j('#<%=categoryTreeView.ClientID %>').find("input:checkbox").each(function(){
if(this != chk){
this.checked = chk.checked;
}
});
}
</script>
请告诉我我去哪儿了。
提前致谢
Please let me know where iam going wron.
Thanks in advance
推荐答案
find(<% = categoryTreeView .ClientID %> );
if(Page_ClientValidate()){
if(tree.get_checkedNodes()。length == 0){
alert(请选择至少一个类别。);
返回false;
}
}
}
< / script >
find("<%= categoryTreeView.ClientID %>"); if (Page_ClientValidate()) { if (tree.get_checkedNodes().length == 0) { alert("Please select atleast one Category."); return false; } } } </script>
和iam使用下面的代码选择所有节点
and iam using below code to select all the nodes
<script type="text/javascript" language="javascript">
function checkUncheckAll(chk){
//alert("test");
j('#<% = categoryTreeView.ClientID %> ')。find(input:checkbox)。each(function(){
if(this!= chk){
this.checked = chk.checked;
}
});
}
< / script >
j('#<%=categoryTreeView.ClientID %>').find("input:checkbox").each(function(){ if(this != chk){ this.checked = chk.checked; } }); } </script>
请告诉我我去哪儿了。
提前致谢
Please let me know where iam going wron.
Thanks in advance
这篇关于Radtreeview发出警报应该选择一个类别,甚至选择它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文