L
laredotornado
Hi,
I want to create a regular expression that will take a single input
name field and save the first and last names to two separate js vars.
The criteria for determining what is the separation would be the first
occurrence of a space (ascii code = 32). However, note that a user
may only enter one word or nothing at all. If the DOM id for the
field I want to parse is "nameField", how would I do this?
Thanks, - Dave
I want to create a regular expression that will take a single input
name field and save the first and last names to two separate js vars.
The criteria for determining what is the separation would be the first
occurrence of a space (ascii code = 32). However, note that a user
may only enter one word or nothing at all. If the DOM id for the
field I want to parse is "nameField", how would I do this?
Thanks, - Dave