Displaying image from drop down, trying to display image from drop down in form and retain data |
Displaying image from drop down, trying to display image from drop down in form and retain data |
thejrod03 |
Nov 6 2006, 01:57 AM
Post
#1
|
Group: Members Posts: 1 Joined: 6-November 06 Member No.: 721 |
I have been trying to work this through for hours and cant seem to get it. What I am trying to do is in a form use a drop down menu to display an image but also when the option is selected to retain the value to be processed into a database. heres the basis of what I have...
<script language="javascript"> <!-- /*Combo Box Image Selector: By JavaScript Kit (www.javascriptkit.com) Over 200+ free JavaScript here! */ function showimage() { if (!document.images) return document.images.pictures.src= document.mygallery.origin_state.options[document.mygallery.origin_state.selectedIndex].value } //--> </script> <form name="mygallery"> <Form action="http://www.onedispatch.com/test/loadposting.php" Method=Post> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <th width="50%"align="center" valign="middle"> <P>Please Select Origin State:<br> <select name="origin_state" onChange="showimage()"> <option value="AL">AL</option> <option value="http://www.onedispatch.com/test/michiganarea.JPG">AK</option> <option value="AZ">AZ</option> <option value="AR">AR</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> </select> <img src="me.gif" name="pictures" width="99" height="100"> <p>Please enter origin area:<br> <input type=text name="origin_area" size=25" id=origin_area> </td> |
Lo-Fi Version | Time is now: 18th April 2024 - 12:10 PM |