Let us discuss, by examining line by line...say the drop down has 3 values via.. red, blue and greenand consider blue is selected.var selection = (document.select.colour.selectedIndex);--> selection is equal to 1.var picture = ((document.select.colour.options[selection].value) + ".jpg");--> picture is equal to "blue.jpg"var text = ((document.select.colour.options[selection].value) + "Text");--> text is equal to "blueText"document.colour.src = picture;document.text.style.display = "";--> here the text is taken as an attribute itself and hence your requirment of embedding the 'blueText' is not done.(correct me if iam wrong in understanding ur req.)