Hi all,
Please check the code below it's working properly in IE but not working in Mozila.
The scenario is that my checkboxlist lidt databound from code behind.
If user selects the first item of the list he is not able to select any other and others will disbaled. Now if user selects any other, ha can not select the first, it will be disabled automatically.
And as and when user uncheck the checkboxes it enables the disbaled all.
I have done it and it;s working in IE please tell me that what i have to do to make it work in Mozila and others also.
A fast reply is awaited!
The code is as :
function UnCheckAll() {
if (document.getElementById("cblStatus").cells.innerText != "") {
var checkBoxList = document.getElementById("cblStatus");
var numCheckBoxItems = checkBoxList.cells.length;
if (document.getElementById(checkBoxList.id + '_' + [0]).checked == true) {
for (i = 1; i < numCheckBoxItems; i++) {
var checkBox = document.getElementById(checkBoxList.id + '_' + [i]);
checkBox.checked = false;
checkBox.disabled = true;
}
}
else {
for (i = 1; i < numCheckBoxItems; i++) {
var checkBox = document.getElementById(checkBoxList.id + '_' + [i]);
checkBox.disabled = false;
}
document.getElementById(checkBoxList.id + '_' + [0]).checked = false;
document.getElementById(checkBoxList.id + '_' + [0]).disabled = true;
}
if (EnableSourced(numCheckBoxItems, checkBoxList)) {
document.getElementById(checkBoxList.id + '_' + [0]).disabled = false;
}
}
}
function EnableSourced(numCheckBoxItems, checkBoxList) {
var RETVAL = false;
for (i = 1; i < numCheckBoxItems; i++) {
var checkBox = document.getElementById(checkBoxList.id + '_' + [i]);
if (checkBox.checked == true) {
return false;
}
else {
RETVAL = true;
}
}
return RETVAL;
}
Please check the code is there any change required to run it in Mozila.
...........
Any one who can help me please.
........Thanx in advance.
..........
Any one please help me.
...............
Ok any one don't know how to make it?
??????????
I am totally frustated with this code any guy please help. It's really needed. I don't like JavaScript. Because of it's not a standard language, any how i was able to write the above code and it's working in IE but not in Mozila. Please try to solve this issue.
Please make it solve!
!!!!!!!!!!!
?????????????????????????????
?????????????????????
\
???
Please help!!!!!!!!!!!!
??? I am not aware of Firebug please make it solve?????????
Any one please help me how can i find the total items in listbox in mozila? AND THEN CHECK FOR IT'S CHECKED PROPERTY?
PLEASE HELPPPPPPPPPPP!!!!!!!!!!!!!!!11
Any one please help me how can i find the total items in listbox in mozila? AND THEN CHECK FOR IT'S CHECKED PROPERTY?
PLEASE HELPPPPPPPPPPP!!!!!!!!!!!!!!!11