Php 下拉列表不能与数据本机菜单一起使用=";假;
我使用PHP的下拉列表从我的sql数据库中检索数据,它存在于这个数据库中 它工作得很好,但当我改变我想要的菜单样式时,就不起作用了。 此菜单代码是我想要的:Php 下拉列表不能与数据本机菜单一起使用=";假;,php,jquery,drop-down-menu,Php,Jquery,Drop Down Menu,我使用PHP的下拉列表从我的sql数据库中检索数据,它存在于这个数据库中 它工作得很好,但当我改变我想要的菜单样式时,就不起作用了。 此菜单代码是我想要的: <select name="parent_cat" id="parent_cat" data-native-menu="false" class="filterable-select" data-iconpos="left"> I think the problem exists because the menu sh
<select name="parent_cat" id="parent_cat" data-native-menu="false" class="filterable-select" data-iconpos="left">
I think the problem exists because the menu shows in popup : `#&ui-state=dialog`
but I do not know how to solve this problem.
this full HTML code :
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Dependent DropDown List</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#parent_cat").change(function() {
$(this).after('<div id="loader"><img src="img/loading.gif" alt="loading subcategory" /></div>');
$.get('loadsubcat.php?parent_cat=' + $(this).val(), function(data) {
$("#sub_cat").html(data);
$('#loader').slideUp(200, function() {
$(this).remove();
});
});
});
});
</script>
</head>
<body>
<form method="get">
<label for="category">Parent Category</label>
<select name="parent_cat" id="parent_cat" data-native-menu="false" class="filterable-select" data-iconpos="left">
<?php while($row = mysql_fetch_array($query_parent)): ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['category_name']; ?></option>
<?php endwhile; ?>
</select>
<br/><br/>
<label>Sub Category</label>
<select name="sub_cat" id="sub_cat"></select>
</form>
</body>
</html>
我认为问题的存在是因为菜单在弹出窗口中显示:`&ui state=dialog`
但我不知道如何解决这个问题。
此完整HTML代码:
相关下拉列表
$(文档).ready(函数(){
$(“#父类”)更改(函数(){
$(本)。在('')之后;
$.get('loadsubcat.php?parent_cat='+$(this).val(),函数(数据){
$(“#sub#cat”).html(数据);
$('#loader').slideUp(200,function(){
$(this.remove();
});
});
});
});
父类别
子类别
请帮助jquery和php在哪里?我想使用与选择菜单的change add data native menu=“false”链接中相同的代码。选择使用带有列表视图的弹出窗口来显示菜单。请编辑您的问题以包含您编写的代码,您的问题本身必须包含相关代码,不只是链接到它。请删除这篇文章,我会写一篇新的文章和完整的代码