The function below works fine in IE but in Netscape the variable num is set to 'undefined'. Can anyone help I cannot find the answer as to what I need to do for Netscape.
Julie.
function showcheckboxvalue(oControl) {
var num = oControl.length;
for (var i=0; i<num; i++)
if (oControl.checked) {
if (oControl.value == "CarParking"
{
if (document.fmGetPropertyDetails.sCarParkingSpaces.value == "-1"
{
alert ("The number of Car Parking Spaces must be selected!"
;
return false;
}
}
if (oControl.value == "Other"
{
if (document.fmGetPropertyDetails.tbOther.value == ""
{
alert ("The 'Other' facilities must be specified!"
;
return false;
}
}
if (oControl.value == "Adapted"
{
var num2 = document.fmGetPropertyDetails.cbAdaptedNeed.length;
var count = 0;
for (var x=0; x<num2; x++)
if (document.fmGetPropertyDetails.cbAdaptedNeed[x].checked) {
count++
}
if (count == 0) {
alert ("At least one adapted need must be specified!"
;
return false;
}
}
}
return true;
}
Julie.
function showcheckboxvalue(oControl) {
var num = oControl.length;
for (var i=0; i<num; i++)
if (oControl.checked) {
if (oControl.value == "CarParking"
if (document.fmGetPropertyDetails.sCarParkingSpaces.value == "-1"
alert ("The number of Car Parking Spaces must be selected!"
return false;
}
}
if (oControl.value == "Other"
if (document.fmGetPropertyDetails.tbOther.value == ""
alert ("The 'Other' facilities must be specified!"
return false;
}
}
if (oControl.value == "Adapted"
var num2 = document.fmGetPropertyDetails.cbAdaptedNeed.length;
var count = 0;
for (var x=0; x<num2; x++)
if (document.fmGetPropertyDetails.cbAdaptedNeed[x].checked) {
count++
}
if (count == 0) {
alert ("At least one adapted need must be specified!"
return false;
}
}
}
return true;
}