Solved

combo onChange value load image

Posted on 2003-12-06
4
1,422 Views
Last Modified: 2008-03-04
Hello, i have a combo with image names i want to display the selected image from combo in some specific area inside html page. i want it with onChange event on combo.No Button. and combo should always be available for image change.
0
Comment
Question by:zahidrahim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 25 total points
ID: 9888309
<img src="default.gif" id="myImage" name="myImage">
<select onchange="documenmyImage.src=this.options[this.selectedIndex].value">
<option value="image1.gif">Image 1</option>
<option value="image2.gif">Image 2</option>
</select>
0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 25 total points
ID: 9888466
a few spelling mistakes and the possibility to choose the first image in the drop down:

<img src="default.gif" name="myImage">
<select onchange="document.myImage.src=this.options[this.selectedIndex].value">
<option value="default.gif">Please select</option>
<option value="image1.gif">Image 1</option>
<option value="image2.gif">Image 2</option>
</select>
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10394819
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: Batalf {http:#9888309} & mplungjan {http:#9888466}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question