<?php
session_start();
include("../../php_crud/my_class.php");
$obj = new my_class();
extract($_GET);
$table_name = "SW_STATION_TBL";
$columns = "STATION_ID,STATION_NAME";
$where_cond = "HYDSUBDIVCODE='$sel_subdiv_id' AND STATION_ID LIKE 'CL%' ORDER BY STATION_ID ASC";
?>
<select id="station" name="station" style="height: 12px !important;" class="chosen-select" onchange="flushData()">
<?php	
foreach($obj->View_colmn_By_Cond_hydro($table_name,$columns,$where_cond) AS $station_list){
	echo '<option value="'.$station_list['STATION_ID'].'#'.$station_list['STATION_NAME'].'">'.$station_list['STATION_ID'].' ('.$station_list['STATION_NAME'].')</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>