Jump to content
xisto Community

af01

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. I know this thread hasnt been active for ages but I am grasping at straws so any help would be massively appreciated. I am using the code below to change a picture upon selection of an option in a form list <script type="text/javascript"> function showpic(o) { o = parseInt(o); switch (o) { case 1: imgName='images/basic/home_1.png';break; case 2: imgName='images/basic/home_2.png';break; case 3: imgName='images/basic/home_3.png';break; case 4: imgName='images/basic/home_4.png';break; case 5: imgName='images/basic/home_5.png';break; } var DivImage = document.getElementById('DivImg'); var DisplayImg = document.getElementById('IdImg'); DisplayImg.src=imgName; DivImage.style.visibility="visible"; } </script> and I am using the numbers of the cases in the option value ie. <option value="1"> of the list for it too work. However, when the form is submitted I get an email that lists the option chosen by the value but obviously I need this as the name of the item not the number. Is there anyway of me changing the option value to a word and the javascript still working? Thanks
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.