php - Dynamic Dropdown onselect -


what trying when item selected dropdown menu, make input box appear description selected on dropdown menu, can edited , updated database,

i unsure how handle javascript:

dropdown code:

<select name="captionselect" id="captionselect">     <?php foreach ($get_images $image){         echo '<option value="'.$image['id'].'">'.$image['description'].'</option>';     };     ?>  </select> 

assuming input has id 'captioninput', here's sample code show input dropdown's selected value:

$('#captionselect').change(function(){     $('#captioninput').val($("#captionselect option:selected").text()).show(); }); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -