Post Reply 
<HTML> Dropboxes and Pictures
Author Message
MoseZ
hXc

Posts: 725.9900
Threads: 50
Joined: 4th May 2007
Reputation: -5.33618
E-Pigs: 14.0773
Offline
Post: #1
<HTML> Dropboxes and Pictures
So, I am editing my profile over at IAM, you prolly don't know what that is though because it is a site that is home to bodily modified peoples. Anywhozer, There is this style HTML that I have seen on a few profiles, and I would like to do it, with a little addition. I have the code for the basic part of it, but what I want to add is when they go over the selection, I want a picture of what they picked to show up. The code is for a drop box that just shows what they are. For ex, IAM would be at the top, and in the dropbox would be Modified, heavily pierced, a nutjob, ect ect.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 <body>
<form action="">
<select name="Less of this">
<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>
</body>
</html>


So basically, what I am asking is how would I be able to add the feature of a picture showing up when they go over the selection? 100 E-piggies if you want it and can help me out...


~MoseZ~


[Image: 1040388856_l-1.jpg]

Spoiler for Favorite Sig/Avy Combo:
[Image: Avatar__Grateful_Dead_Bear_by_Fanta.gif]

[Image: gratefuldeadcopy.png]

MehHakker
[Image: mosezava.png]

[Image: gift4mosez.png]

Shady545

Hellgiver - 22-03-16:37 -- sweet, get in your jet and meet me here in under an hour. I'll stall 'em...

p0op Wrote:I don't trust Dark_Alex...he's up to something......
16/07/2009 01:46 PM
Find all posts by this user Quote this message in a reply
amzter
The bird stole my shoe.

Posts: 1,830.3066
Threads: 342
Joined: 3rd May 2007
Reputation: -4.56241
E-Pigs: 54.7074
Offline
Post: #2
RE: <HTML> Dropboxes and Pictures
Erm possibly something in JavaScript, I learnt how to do this on work exp but that was in flash, let me find a guide for you.

Edit:

http://www.htmlcodetutorial.com/images/i...pp_59.html

try that

[Image: 494851774.png]
Search:
(This post was last modified: 16/07/2009 02:04 PM by amzter.)
16/07/2009 02:03 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Brittany
D3SU!

Posts: 447.1059
Threads: 34
Joined: 15th Feb 2008
Reputation: 0.27496
E-Pigs: 25.0846
Offline
Post: #3
RE: <HTML> Dropboxes and Pictures
Mmm I took an HTML/CSS class and have a guide laying somewhere around my room.
If ^ one doesn't work let me know and Ill dig it up and post the code. ♥

[Image: photo.png]
16/07/2009 03:30 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #4
RE: <HTML> Dropboxes and Pictures
Are you referring to when the user hovers the mouse over a selection?  That'll be difficult for a select box.  You can do it when they _select_ an option from the select box.
Alternative is to make your own custom select box, but that takes more effort.
16/07/2009 11:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MoseZ
hXc

Posts: 725.9900
Threads: 50
Joined: 4th May 2007
Reputation: -5.33618
E-Pigs: 14.0773
Offline
Post: #5
RE: <HTML> Dropboxes and Pictures
well Zinga, either way would work. But you can make a selection, and it would just appear in the dropbox, but just as the only one, and selected until you click on something else. But when they do click on it then, next to it would be a picture of what they just selected. I'm not sure how difficult this would be, and I'll try the first offered suggestion tomorrow sometime.

~MoseZ~


[Image: 1040388856_l-1.jpg]

Spoiler for Favorite Sig/Avy Combo:
[Image: Avatar__Grateful_Dead_Bear_by_Fanta.gif]

[Image: gratefuldeadcopy.png]

MehHakker
[Image: mosezava.png]

[Image: gift4mosez.png]

Shady545

Hellgiver - 22-03-16:37 -- sweet, get in your jet and meet me here in under an hour. I'll stall 'em...

p0op Wrote:I don't trust Dark_Alex...he's up to something......
17/07/2009 12:44 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
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
MoseZ
hXc

Posts: 725.9900
Threads: 50
Joined: 4th May 2007
Reputation: -5.33618
E-Pigs: 14.0773
Offline
Post: #7
RE: <HTML> Dropboxes and Pictures
Okay, I am confused as how to replace your test link with a live link. I'm going to try and google HTML for dummies or something...

~MoseZ~


[Image: 1040388856_l-1.jpg]

Spoiler for Favorite Sig/Avy Combo:
[Image: Avatar__Grateful_Dead_Bear_by_Fanta.gif]

[Image: gratefuldeadcopy.png]

MehHakker
[Image: mosezava.png]

[Image: gift4mosez.png]

Shady545

Hellgiver - 22-03-16:37 -- sweet, get in your jet and meet me here in under an hour. I'll stall 'em...

p0op Wrote:I don't trust Dark_Alex...he's up to something......
21/07/2009 07:05 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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

 Quick Theme: