[eluser]rainfall[/eluser]
Earlier i worked with a dropdown that shows id in a text box from selected name ..
But now i retrieve both id and name in option value . and save separately in database using PHP explode function ..
Code:
<option value="<?php echo $row->branch_name. '|'. $row->branch_id;?>"> <?php echo $row->branch_name ?> </option>
Code earlier used for display id in a text box below
in View
Code:
echo '<option value="'.$row->emp_id.'">'.$row->employee_name.'</option>';
Jquery In view
Code:
[removed][removed]
[removed]
$(document).ready( function() {
$('#empName').change( function() {
// enter in an empty field code of the selected bank
$('#empId').val( $(this).val() );
});
});
[removed]
Its only works for only a single value in option
Now if I want to show only branch_name or brach_id in a text box below what to do in Jquery ??