Jump to content

Archived

This topic is now archived and is closed to further replies.

Pi_Mastuh

Declare Variable with Dropdown box

Recommended Posts

I have this piece of code:

<textarea name=shopImageLink cols=30>$shopImageLink</textarea>

It declares the variable by what you type in or somethin like that but i want to change it to a dropdown bow that displays a name and declares the variable as a url based on the name. I don't know exactly what the code does, but you're suppossed to enter a url of a picture. i want them to be able to choose from a list of pictures.

Share this post


Link to post
Share on other sites
So you mean by using a drop down you select a name and it will have a preview of the picture next to it?
example:
(cat, dog, fish) when you go down the drop down if you click cat it shwos a cat, etc.
Or not?

Share this post


Link to post
Share on other sites
No, A dropdown list with something like Cat, Dog, etc. And whn you click dog, for example, it stores $shopImageLink as dog.jpg.

Share this post


Link to post
Share on other sites
[code]<select name="shopImagelink">
<option value="cat.jpg">Cat</option>
<option value="dog.jpg">Dog</option>
<option value="fat_wombat.jpg">Wombat</option>
</select>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.