FALCONSEYE
Programmer
I have a page with the following javascript:
function checkAll()
{
var myForm = document.getElementById('sCampaign');
for (var i=0; i<myForm.length; i++)
{
if ( myForm.elements.checked == true)
{
myForm.elements.checked = false;
}
else
{
myForm.elements.checked = true;
}
}
}
which checks/unchecks all the checkboxes on the form.
I make a call to this page via AJAX. When the form loads, I get an error saying "checkAll() is not defined". When I hit the page in different browser, everything works fine.
Does anyone know what goes wrong here?
thanks in advance
function checkAll()
{
var myForm = document.getElementById('sCampaign');
for (var i=0; i<myForm.length; i++)
{
if ( myForm.elements.checked == true)
{
myForm.elements.checked = false;
}
else
{
myForm.elements.checked = true;
}
}
}
which checks/unchecks all the checkboxes on the form.
I make a call to this page via AJAX. When the form loads, I get an error saying "checkAll() is not defined". When I hit the page in different browser, everything works fine.
Does anyone know what goes wrong here?
thanks in advance