click on link and fill in form in HTML CSS PHP?

MastErF87

New member
I have two text fields, and then I have two radio buttons, one for the upper text field, and one for the button text field.

I got it to put my name on the first text field.

<input name="textfield1" type="text" id="textfield1" />
<input name="textfield2" type="text" id="textfield2" />
<br />
<a href="#" onclick="textfield1.value='My Name'; return false;"> My Name</a>

that would fill in for textfield1 'My Name'
but it should put it on wherever the radio button is selected.

I hope this makes sense. I've spent ages searching for this kind of script and I assume Javascript is the way to go?

Thanks in advance for any help anyone can offer. :)
 
Back
Top