Hello

I have the following requirement:

(1) There is a drop down box with a list of titles
(2) When user selects one item in the list, an image corresponding to this item is shown just below the list box
(3) This same image is set as the background image for a div with div id 'header'

How will this be coded

Regards
Arvind

<select onchange='document.smallimage.src= this.value;document.header.background.src=this.value'>
<option selected='selected' value='blank.jpg'>Choose</option>
<option value='1.jpg'>one</option>
<option value='2.jpg'>two</option>
<option value='3.jpg'>three</option>
<option value='4.jpg'>four</option>
<option value='5.jpg'>five</option>
<option value='6.jpg'>six</option>
</select><br>
<img name='smallimage' id='smallimage' width='320' height='240' src='blank.jpg'>
commented: concise answer +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.