-1
HIは、Ajaxのための私のonchange機能にエラー解決キャッチされないの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>
トラブルのこの同じ種類に入ったいずれかの場合
<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