penguinspeaks
Technical User
Now that my form is actually working, and thanks again everyone for the great help, I do have another question.
I am writing a form to enter users into a database table. This will be completed by a supervisor for a few different reasons.
What I want this form to do is create the username on the fly by taking the first name, last initial, and the birth year.
If it is a supervisor, this format does not have to be the same as an employee so I do have a check box asking if the username should be "auto crated". Here is the code I have so far:
this was used to try and combine the fields of first and last names, but this gave me
I am writing a form to enter users into a database table. This will be completed by a supervisor for a few different reasons.
What I want this form to do is create the username on the fly by taking the first name, last initial, and the birth year.
If it is a supervisor, this format does not have to be the same as an employee so I do have a check box asking if the username should be "auto crated". Here is the code I have so far:
Code:
<script type="text/javascript">
function FillUser(f) {
if(f.createuser.checked == true) {
f.username_.value = f.fname+f.lname.value;
}
}
</script>
this was used to try and combine the fields of first and last names, but this gave me
Code:
[object HTMLInputElement]"whatever the last name was in the field" so I know the code is incorrect.
my fields are fname lname and dob_ is there a way to combine these in the fashion that I want it?