<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/taglib/c.tld" prefix="c"%>
<span class="help-inline">应往届：</span>
<select class="span2" id="graduate_type" name="graduate_type">
</select>
<script type="text/javascript">
$(function(){
	$('#exam_id').change(updateGraduateType);
	updateGraduateType();
})

function updateGraduateType(){
	var examId = $('#exam_id option:selected').val();
	if(examId!=undefined && examId.length>0){
		$.post('${ctx}/analysis/condition/graduate-types.json',{"examId":examId},function(res){
			$('#graduate_type').html('');
			$.each(res,function(index,obj){
				var row = $('<option value="'+obj.id+'">'+obj.name+'</option>');
				$('#graduate_type').append(row);
			});
			$('#graduate_type').trigger('change');
		});
	}
}
</script>