I have this javascript used to create a user's email address (First letter
of firstname + last name + @zbx.com) on the fly once the have inputted
their first name and last name. The name of the form is Quick Add. THe
script is below but when I execute it I get error: Object does not support
this property or method. The email field eventually populates after
getting the error but it shows undefined for the value Fname[0]. How do I
put the first letter of a variable correctly? Can you help?
<SCRIPT LANGUAGE="JavaScript">
<!--
function MakeUser()
{
var Lname = document.QuickAdd.Last_Name.value
var Fname = document.QuickAdd.First_Name.value
var NewEmail = Fname[0] + Lname + "@zbx.com";
document.QuickAdd.Email.value = NewEmail
}
//-->
</SCRIPT>