我正在使用自动完成
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
下面我有两页index.php
和ajx_page.php
索引.php
<form name="send_coup_ajx_form" id="send_coup_ajx_form" method="post">
<select name="member_type" id="member_type">
<option value="customer_type">Customer</option>
<option value="BPartner_type">Business Partner</option>
</select>
<input type="text" name="sel_rad" id="resultant_text" />
<input type="submit" name="submit" value="go" />
</form>
<script type="text/javascript">
$(document).ready(function(){
$("#resultant_text").autocomplete("ajx_page.php", {
width: 260,
matchContains: true,
//mustMatch: true,
//minChars: 0,
//multiple: true,
//highlight: false,
//multipleSeparator: ",",
selectFirst: false
});
});
</script>
下面的代码
ajx_page.php
<?php
$select_type = $_GET['member_type'];
$type = $_GET['sel_rad'];
?>
当我在文本框中输入时,它给了我一个错误
Notice: Undefined index: member_type in ajx_page.php on line 2
这意味着member_type
不会进入该页面..
当我评论所有这些代码并将下面的代码放入ajx_page.php
<?php
echo "Name1\n";
echo "Name2\n";
echo "Name3\n"
?>
它显示自动完成功能列表。但是当我想获取该对象的值时,member_type
它说的是一个错误..
那么我如何使用这个自动完成插件传递额外的值
我已将图像添加到 @veeTrain 覆盖问题