update username fld based on values entered in name flds
Posted: Mon Dec 02, 2002 11:29 pm
I wish to poulate a username field with the first char of the fname, and first 7 say of the lname field when entered on a form.
I have set the onchange of the fname and lname flds to be a javascript call setusername so that the username reflects changes in these fields.
Basically left(document.myform.fname.value, 1) + left(document.myform.fname.value, 7)
Just the javascript syntax I am unsure of.
I have set the onchange of the fname and lname flds to be a javascript call setusername so that the username reflects changes in these fields.
Basically left(document.myform.fname.value, 1) + left(document.myform.fname.value, 7)
Just the javascript syntax I am unsure of.
Code: Select all
<SCRIPT language="JavaScript">
function setusername ()
{
document.myform.username.value=?;
}
</SCRIPT>
Any assistane would be appreciated.
-Dickey