Forum Moderators: open
I have a check box which needs to check all or uncheck all, boxes inside a form in an iframe. to be precise the onclick is outside the iframe which contains the form which is called mylist. this is the script i am using.
function checkAll(checkname, exby) {
for (i = 0; i < checkname.length; i++)
checkname[i].checked = exby.checked? true:false
}
This code starts the process
<input name="catagory" type="checkbox" onClick="checkAll(document.mylist,this)" >
the current argument is document.mylist. What argument should i use to pass the mylist form in the iframe to the function checkAll? The iframes id and name is profilewindow. the checkAll function is included in both documents.
Thankyou in advance for any help.
This is the error i get in the firefox java script error console
document.getElementById("profilewindow").document is undefined
I am sure the ids i gave are correct. is there any reason it might not be able to find the element? is there a way to see what elements are avalible to java script at run time?