function validate()
{
with (document.webform)
{
var alertMessage = "The following REQUIRED fields\nhave been left empty:\n";
if (email.value == "") {
alertMessage += "\nEmail"
}
if (document.getElementById("00N20000000kuLd").value == "") {
alertMessage += "\nNo of financials licenses"
}
if (alertMessage != "The following REQUIRED fields\nhave been left empty:\n")
{
alert(alertMessage);
return (false);
}
}
}
Convert the custom force variable to a strvariable like so
strVariable = document.webform['00N20000000kuLd'].value;
Then use that in the validation like so
if (strVariable == "") {alertMessage += "\nNo of financials licenses" }
Hope this helps another newbie.
Hi Macone,
Have you tried getDocumentElementById()?
Â