Hi,

I'm currently trying to implement some code into an Adobe Interactive Smart Form that I am building in LiveCycle designer.

I have stumbled across the following on http://www.w3schools.com:

function validateForm()
{
var x=document.forms["myForm"]["email"].value
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
{
alert("Not a valid e-mail address");
return false;
}
}



My question specifically relates to the "document.forms" reference.

First, is this a reference to something inherent.

Second, what are the values that are being passed to the array? I'm guessing it is the title of the form and the name of the field to validate?


Any help would be grately appreciated.



Many Thanks,

Rob.