Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy &paste the link's text to input field

Status
Not open for further replies.

missplume

Technical User
Sep 4, 2001
29
US
Hi,
I have a form that opens when you ckick on a text link. I'd like one of the text fields to pick up that text.
Here is the field i currently have:
<INPUT type=&quot;text&quot; name=&quot;booktitle&quot; value= Book title>
and my visitors have to type in the name of the book they just clicked on.
To avoid errors, I would like something like the value element to be the text of the link rather than the fixed &quot;book title&quot; I currently have.
Thanks

 
Here:

<INPUT type=&quot;text&quot; name=&quot;booktitle&quot;>
<a href=&quot;place.html&quot; id=&quot;book_name&quot; onClick=&quot;booktitle.value='the book name that should go here!';return false&quot;>click me</a>

Rick If I have helped you just click the first link below to let me know :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top