hi experts,
i have script, it works only if there are more than 1 checkbox. But it doesnt work if there is only one checkbox present.
Any one who can figure out?
function validateForm()
{
obj = document.formname.elements("chkbox");
for (i = 0; i < obj.length; i++)
{
if (obj.checked)
{
alert("Good Job")
}
}
alert("Select Item from the list")
return false;
}
i have script, it works only if there are more than 1 checkbox. But it doesnt work if there is only one checkbox present.
Any one who can figure out?
function validateForm()
{
obj = document.formname.elements("chkbox");
for (i = 0; i < obj.length; i++)
{
if (obj.checked)
{
alert("Good Job")
}
}
alert("Select Item from the list")
return false;
}