Connecting Tech Pros Worldwide Forums | Help | Site Map

Drop-down list and image files

Newbie
 
Join Date: May 2007
Posts: 4
#1: May 14 '07
Hi,
Here is what I want to make:
I have a drop-down list objects. With A, B, C objects
When I select an item (ex. A) want to display a image file into the same web page, not into another page- imagA.bmp.
When select C item want to disp. imagB.bmp.

Have you any tutorial?

Many thanks,
Radu
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: May 15 '07

re: Drop-down list and image files


I see that you have posted this in other forums. Please do not double/triple post.

You'll want to use onchange e.g.
Expand|Select|Wrap|Line Numbers
  1. <select ... onchange="blah()">
You'll need an image:
Expand|Select|Wrap|Line Numbers
  1. <img src="img.gif">
Then in your function which you call onchange, just change the src of the image:
Expand|Select|Wrap|Line Numbers
  1. img.src = "newimg"
If you still have problems, post your code.
Reply