Post Reply 
<HTML> Dropboxes and Pictures
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #6
RE: <HTML> Dropboxes and Pictures
Do you mean something like this?

HTML Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
<body>
<form action="">
<select name="Less of this" onchange="var o=escape(this.options[this.selectedIndex].value);document.getElementById('select_img').src='http://example.com/images/'+o+'.jpg';">
<option value="Less">Less of this</option>
<option value="narrow minded">narrow minded people</option>
<option value="arrogance">arrogance</option>
<option value="stress">stress</option>
<option value="drugs">drugs</option>
<option value="raisins">raisins in my muesli</option>
<option value="bananas">bananas, avocado, mushrooms</option>
<option value="sunday drivers">sunday drivers</option>
<option value="children">children</option>
<option value="pets">pets</option>
<option value="smoke">smoke</option>
</select>
</form>
<img src="" id="select_img" />
</body>
</html>


Haven't tested it.
You'll need to fix the URL above (obviously).  It'll replace the "'+o+'" above with the value of the selected item, eg if you selected the first item, it'll set the image's src to:

Code:
http://example.com/images/Less.jpg

17/07/2009 01:15 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
<HTML> Dropboxes and Pictures - MoseZ - 16/07/2009, 01:46 PM
RE: <HTML> Dropboxes and Pictures - amzter - 16/07/2009, 02:03 PM
RE: <HTML> Dropboxes and Pictures - MoseZ - 17/07/2009, 12:44 AM
RE: <HTML> Dropboxes and Pictures - ZiNgA BuRgA - 17/07/2009 01:15 AM
RE: <HTML> Dropboxes and Pictures - MoseZ - 21/07/2009, 07:05 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)

 Quick Theme: