<?php
session_start();
include("../../php_crud/my_class.php");
$obj = new my_class();
extract($_GET);
//print_r($_GET);
$table_name = "HYDROLOGY.GWM_TBL@HYDRO10";
$columns = "WELL_ID,OLD_ID ";
$where_cond = "UPAZILA_CODE='$sel_upazila_id'";
?>

<select id="old_id" name="old_id" style="height: 12px !important;" class="chosen-select" onchange="load_new_id_by_old_id(this.value)">
<?php	
foreach($obj->View_colmn_By_Cond($table_name,$columns,$where_cond) AS $old_id){
	echo' <option value="Select Old ID"></option>';
	echo '<option value="'.$old_id['OLD_ID'].'">'.$old_id['OLD_ID'].'</option>';
	}
?>
</select>



<script>
    $('.chosen-select').chosen({allow_single_deselect:true}); 
	//resize the chosen on window resize
	$(window)
	.off('resize.chosen')
	.on('resize.chosen', function() {
		$('.chosen-select').each(function() {
			 var $this = $(this);
			 $this.next().css({'width': '100%'});
		})
	}).trigger('resize.chosen');
	//resize chosen on sidebar collapse/expand
	$(document).on('settings.ace.chosen', function(e, event_name, event_val) {
		if(event_name != 'sidebar_collapsed') return;
		$('.chosen-select').each(function() {
			 var $this = $(this);
			 $this.next().css({'width':'100%'});
		})
	});
</script>