Solved

combo onChange value load image

Posted on 2003-12-06
4
1,402 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now