-1
喜正在错误解决未捕获的ReferenceError:未定义(...)
new_ Uncaught ReferenceError: get_class_sections is not defined(…)
在阿贾克斯我平变化的功能,我如何解决这个问题,该决议已经看到,到目前为止并不适用于我。
<div class="form-group">
<label class="col-sm-3 control-label">State</label>
<div class="col-sm-5">
<select name="state" class="form-control select2" style="width:100%;" data-validate="required" id="State"
data-message-required="State Required" onchange="return get_state_cities(this.value)">
<option value="">Select</option>
<?php
$notarray = DataDB::getInstance()->select_from('state');
foreach($notarray as $row):
?>
<option value="<?php echo $row['state'];?>"> <?php echo $row['state'];?> </option>
<?php
endforeach;
?>
</select>
</div>
</div>
AJAX功能
<script type="text/javascript">
function get_state_cities(state) {
$.ajax({
url: 'func.php',
data: { param1: state, action: city}
success: function(response)
{
jQuery('#city_selector_holder').html(response);
}
});
}
' get_class_sections'不是在您与我们分享的任何代码中都有。 – Quentin