Hello all,
I am trying to strip all of the white space,front and back, from a variable that has the value of a text box in it.
I've tried so many different techniques but to no avail...
here is an example of some of my code...
var firstname =(document.registration_form.FirstName.value);
if (firstname == '')
{
alert('Please fill in your first name!');
return false;
}
Just to repeat myself, how can I strip all of the spaces in the above variable "firstname"?
Thanks in advance!