Hi, all,

Ive currently got a javascript dropdown which changes an image on the page depending on what option is choosen.

Just woundered how i can expand this to make it show some specific text with each option aswell, maybe in a div.


         <script type="text/javascript">
             var linkData = [
            //preload the pics
            var picO = new Array();
            for(i=0; i < linkData.length; i++){
                picO[i] = new Image();
                picO[i].src = linkData[i][0];
            }function show(val) {
                document.getElementById('picture').src = picO[val-1].src;
                document.getElementById('caption').href = linkData[val-1][1];
            } window.onload=function(){ show(1); }
            <select name="dropdown" onchange="show(this.value);">
                <option value="1">Option 1</option>
                <option value="2">Option 2</option>
                <option value="3">Option 3</option>

             <a id="caption" href="#"><img id="picture" src="" /></a>