I have an input like this:
<input type="hidden" name="myName" value="John Fitzgerald Kennedy " />
When I read the input content using Javascript:
var myName = document.getElementsByName("myName")[0].value;
The content of myName: "John Fitzgerald Kennedy "
;
How to have the content: "John Fitzgerald Kennedy "
?
I have to count the fixed chars between name and surname to find the surname and split correctly two separate strings.
Thank you!