paste into text field of a form from hyperlink choice
Hi
If I had a list of images for a user to select from, is there any way of using javascript to insert the image address into a text field of a html form, once the image has been clicked?
There are about 20 images to be selected in all.
Unfortunately I have no experience with javascript and images cannot be used in a list/menu of a form.
Thanks for your time!
Last edited by Trinity-Links; 01-05-2009 at 11:47 AM..
Reason: update
I am creating a css menu maker and have about 20 background gradiants for users to choose from.
Once the user has selected the image to use, the form is submitted (hopefully with the image name in the text field) and I use PHP to tweak the CSS menu code
I'd recommend you to use radio buttons along with those images, to record the selected one correctly even if there is no javascript. (Thus you may avoid that text field)
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
I'd recommend you to use radio buttons along with those images, to record the selected one correctly even if there is no javascript. (Thus you may avoid that text field)
Well, yes, you are quite right in one way but if Javascript is not enabled all bets are off anyway, and this forum has little purpose. But the OP did specify that he wanted the image address inserted into a text field.
Well, yes, but if Javascript is not enabled all bets are off anyway, and this forum has little purpose.
I meant, if it's purely a client-side requirement, javascript is enough. But the OP's case includes submitting a form and processing the posted data. That's why I asked the 'ultimate aim' first
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)