Jump to content


Photo

Declare Variable with Dropdown box


  • Please log in to reply
4 replies to this topic

#1 Pi_Mastuh

Pi_Mastuh
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationMN

Posted 23 September 2006 - 09:02 PM

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.
Schroedinger's Cat walks into a bar.
And doesn't.

#2 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 23 September 2006 - 09:08 PM

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?

#3 Pi_Mastuh

Pi_Mastuh
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationMN

Posted 23 September 2006 - 09:15 PM

No, A dropdown list with something like Cat, Dog, etc. And whn you click dog, for example, it stores $shopImageLink as dog.jpg.
Schroedinger's Cat walks into a bar.
And doesn't.

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 24 September 2006 - 12:03 AM

<select name="shopImagelink">
<option value="cat.jpg">Cat</option>
<option value="dog.jpg">Dog</option>
<option value="fat_wombat.jpg">Wombat</option>
</select>

Legend has it that reading the manual never killed anyone.
My site

#5 Pi_Mastuh

Pi_Mastuh
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationMN

Posted 24 September 2006 - 12:04 AM

Thank you, I thought it was something along those lines.
Schroedinger's Cat walks into a bar.
And doesn't.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users