<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/taglib/c.tld" prefix="c"%>
<span>学校：</span>
<select class="label-option-middle report-parameter" id="school_id" name="school_id">
</select>
<script type="text/javascript">
$(function(){
	$('#exam_id').change(updateSchools);
	
	updateSchools();
})

function updateSchools(){
	var exam_id = $('#exam_id option:selected').val();
	if(exam_id!=undefined && exam_id.length > 0){
		$.post('${ctx}/admin/exam/schools.json',{"examId":exam_id, "roleId":${roleId}},function(res){
			$('#school_id').html('');
			$.each(res.schoolList,function(index,obj){
				var row = $('<option value="'+obj.id+'">'+obj.name+'</option>');
				$('#school_id').append(row);
			});
		});
	}
}
</script>