I'm sorry this is probably very basic but I'd like to pass a variable from one page to another. I have one page with a list of names and the next page is a form. One of the inputs on the form is for a name. I'd like to fill the value of this name input with the name that was clicked on from the list of names.
For instance, this is the list of names that link to the form when clicked on:
<a href="form.html" id="John Doe">John Doe</a>
<a href="form.html" id="John Smith">John Smith</a>
<a href="form.html" id="Jane Doe">Jane Doe</a>
form.html would look like this:
<form>
<input name="name" type="text" value=""/>
</form>
I'd like the value of the text input to change depending on which name was clicked. I'd prefer to do it with javascript but whatever you guys think is best.