Populating a text box from a hyperlink?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
itnassol
Forum Newbie
Posts: 2
Joined: Wed Jul 16, 2008 10:28 am

Populating a text box from a hyperlink?

Post by itnassol »

Hi,

Heres the situation, i have a page, and on that page are the results from a database, simply a number 12345 and a picture, the repeated region then speads it over the page.

At the bottom of the page is a text box and at the memnt the user has to enbter the number he is interested in into the text box and click enter, this then stores that number so we have a record of the requested number and displays the results on the next page.

Is it possible and if so how, to have a way to click on the little picture or the number and have the text box populate with that number, so they dont have to type it in, but we can still do an insert to keep a record of searchs?

Thanks

Andrew
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Populating a text box from a hyperlink?

Post by Benjamin »

Yes Andrew, this is possible using javascript. Here is a google search that should help you find snippets to modify.

http://www.google.com/search?q=set+text ... =firefox-a
Post Reply