<form method="get" action="" >
    <div class="infoNewBar"></div>
    <div class="div-table info-list">
		<div class="div-tr ">
    		<?/*<div class="div-td td-odd">大分類</div>
    		<div class="div-td td-even">
    			<span class="selectBox">
    				<div class="select">
    					<select name="efid" id="efid">
    						<option value="" >===請選擇大分類===</option>
    						<?foreach ($Fkind as $k => $v){?>
    						<option value="<?=$k?>" <?=($_SESSION[$features]["efid"] == $k ?"selected":"")?> ><?=$v?></option>
                            <?}?>
    					</select>
    				</div>
    			</span> 
    		</div>
    		<div class="div-td td-odd">中分類</div>
    		<div class="div-td td-even">
    			<span class="selectBox">
    				<div class="select">
    					<select name="esid" id="esid">
    						<option value="" >===請選擇中分類===</option>
    						<?foreach ($Skind as $k => $v){?>
    						<option value="<?=$k?>" <?=($_SESSION[$features]["esid"] == $k ?"selected":"")?> ><?=$v?></option>
                            <?}?>
    					</select>
    				</div>
    			</span>
    		</div>
    	</div>
    	<div class="div-tr ">
    		<?/*<div class="div-td td-odd">細分類</div>
    		<div class="div-td td-even">
    			<span class="selectBox">
    				<div class="select">
    					<select name="eiid" id="eiid">
    						<option value="" >===請選擇細分類===</option>
    						<?foreach ($Item as $k => $v){?>
    						<option value="<?=$k?>" <?=($_SESSION[$features]["eiid"] == $k ?"selected":"")?> ><?=$v?></option>
                            <?}?>
    					</select>
    				</div>
    			</span>
    		</div>*/?>
    		<div class="div-td td-odd">關鍵字</div>
    		<div class="div-td td-even">
    			<input type="text" class="form-control" name="keywords" value="<?=$_SESSION[$features]["keywords"]?>" >
    		</div>
    	</div>
    	
    </div>	
    
    <div class="clearfix"></div>
    
    <div class="infoConfirmBtn">
    	<button type="submit">確定</button>
    </div> 
</form>
<script type="text/javascript">
	$("#efid").change(function(){
		if($(this).val()!=""){
			$.ajax({
				url: '<?=base_url("/$iiename/$features/get_skind")?>/'+ $(this).val(),         //呼叫的URL
				type: 'post',                     //傳送方式
				success: function (data) {        //傳送成功執行
					if(data!=""){
						$("#esid").empty();
						$("#esid").append(data);
						$("#eiid").empty();
						$("#eiid").append('<option value="0" selected="">請選擇細分類</option>');
					}else{
						$("#esid").empty();
						$("#esid").append('<option value="0" selected="">請選擇中分類</option>');
						$("#eiid").empty();
						$("#eiid").append('<option value="0" selected="">請選擇細分類</option>');
					}
				},
				error: function (msg) {           //傳送失敗執行
					console.log(msg);
				}
			});
		}else{
			$("#esid").empty();
			$("#esid").append('<option value="0" selected="">請選擇中分類</option>');
			$("#eiid").empty();
			$("#eiid").append('<option value="0" selected="">請選擇細分類</option>');
		}
	});
	$("#esid").change(function(){
		if($(this).val()!=""){
			$.ajax({
				url: '<?=base_url("/$iiename/$features/get_item")?>/'+ $("#efid").val() +'/'+$(this).val(),         //呼叫的URL
				type: 'post',                     //傳送方式
				success: function (data) {        //傳送成功執行
					if(data!=""){
						$("#eiid").empty();
						$("#eiid").append(data);
					}else{
						$("#eiid").empty();
						$("#eiid").append('<option value="0" selected="">請選擇細分類</option>');
					}
				},
				error: function (msg) {           //傳送失敗執行
					console.log(msg);
				}
			});
		}
	});
</script>