Split data from single text box into multiple text boxes
Hi,
I am trying to make a simple form that splits two words that a user enters has entered into a text box into separate querystrings.
Please see the attached images for a better explanation.
The user enters two words into a textbox and clicks submit.
I then want use javascript to:
Check the user has only entered two words,
trim any leading and trailing spaces,
split the two words into separate boxes and submit the data to a different page.
You have not give enough information to finish the response...
You need a URL to send the information toward and you would use the information in queryStringInfo to pass.
For example:
Code:
var str = "http://www.somewhere.com?fName="+queryStringInfo[0]+"&lName="+queryStringInfo[1];
document.location.href = str;
You will need a button or link to the code for it to become an event for action to happen,
but that is also information you have not provided in your request.
The url that I want to send the information to will be called something like www.mynewsite.com/step2.html
My old site is hosted on a different domain to just make things more confusing.
On the old site I want one text box and a button. The user enters two words into the text box and then clicks the button. They are then transferred to http://www.mynewsite.com/step2.html?...serssecondword
Bookmarks