hover - Changing image when hovering text depending on dropdown options -
i trying make simple webpage shows merely 1 figure changes depending on 1) hover options , 2) dropdown menu.
that is, way figure changes when hovering on hover options should depend on options chosen in dropdown menu.
so far have got.
<html> <head> <script> function changeimage(towhat,url){ if (document.images){ document.images.targetimage.src=towhat.src gotolink=url } } function warp(){ window.location=gotolink } </script> <script language="javascript1.1"> var myimages=new array() var gotolink="#" function preloadimages(){ (i=0;i<preloadimages.arguments.length;i++){ myimages[i]=new image() myimages[i].src=preloadimages.arguments[i] } } preloadimages("figure 1.gif","figure 2.gif","figure 3.gif") </script> </head> <center> choose options <br> <select> <option value="1"> option 1 </option> <option value="2"> option 2 </option> </select> <img id="preview"> </td> <br> <br> <br> hover below<br> <a href="f15.htm" onmouseover="changeimage(myimages[1],this.href)" onmouseout="changeimage(myimages[0],this.href)"> option x </a> <br> <a href="su27.htm" onmouseover="changeimage(myimages[2],this.href)" onmouseout="changeimage(myimages[0],this.href)"> option y </a> <br> <a href="javascript:warp()"><img src="figure 1.gif" name="targetimage" style="width:304px;height:228px;" border=0></a> </center> </body> </html>
how link hover outcome chosen dropdown options?
Comments
Post a Comment