For java-script, the form field name must begin with an alphabet character (a through z or A through Z).The rest of the field name may be composed of alphabet characters, digits, and/or underscore characters.
For example, this will work
but this will not, because the form field name contains a space
If a field name can not be changed, the form handler expects it to be named as it is, for example, or if changing the field name creates a lot of work changing other things that rely on the name as it is, than perhaps this will work. Use an id value for the field instead of the field name.
For example, let's suppose this is the field:
The field name, because it contains a space, can not be used in java-script to assign a value to it. However, the field's id can be used.
The id would be used in this way:
ID values begin with a letter and are composed of letters, numbers, and underscore characters. Id values within the source code of a web page must all be unique.