I have a problem with checkboxes.
I have a JavaScript function which checks whether any rows of a table have been checked (each row has a checkbox). If no rows are checked, are the user has requested to delete some checked rows, then a prompt is made to the user to tell them they haven't checked any.
This works fine 99% of the time, EXCEPT where I only have 1 row in the table. In that case, it can't even see the checkbox. The debug line below produces an error which says that "document.addToPort.epic.0.checked is nul or nor an object".
alert("document.addToPort.epic[0].checked is " + document.addToPort.epic[0].checked);
Also, it is assigning document.addToPort.epic.length to "undefined", when it should be 1.
The exact code works fine where there is more than 1 record. So what's going on?
I am using IE 6.0
cheers for any help.
I have a JavaScript function which checks whether any rows of a table have been checked (each row has a checkbox). If no rows are checked, are the user has requested to delete some checked rows, then a prompt is made to the user to tell them they haven't checked any.
This works fine 99% of the time, EXCEPT where I only have 1 row in the table. In that case, it can't even see the checkbox. The debug line below produces an error which says that "document.addToPort.epic.0.checked is nul or nor an object".
alert("document.addToPort.epic[0].checked is " + document.addToPort.epic[0].checked);
Also, it is assigning document.addToPort.epic.length to "undefined", when it should be 1.
The exact code works fine where there is more than 1 record. So what's going on?
I am using IE 6.0
cheers for any help.