dear sir:
i have a question about autocomplete extraParams, in my java action,
String modelno=request.getParameter("modelno");
i does not print out the aaa value, instead , it print out String as 'function() {return $("#modelno").val(); }'
what wrong with my jquery? thank for helping
----------------------------------------------------------------------------------------------
<html>
<head>
<!-- jQuery CSS -->
<link type="text/css" href="../../css/jquery.autocomplete.css" rel="stylesheet"/>
<!-- jQuery Button AutoComplete start -->
<script type="text/javascript" src="../../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../../js/jquery.autocomplete.js"></script>
<script type="text/java_script" src="../../js/jquery_uni.js"></script>
<script language="JavaScript">
$(document).ready(function(){
$("#pno").autocomplete("/M51800N.do", {
highlight: false,
mustMatch: false,
matchContains: true,
cacheLength: 20,
minChars: 2,
extraParams: {
pageid:"M51800N",
action:"ajax",
'modelno': function() {
return $("#modelno").val();
}
}
});
})
</script>
</head>
<body>
<input type="text" value="" name="pno" id="pno"/>
<input type="text" value="aaa" name="modelno" id="modelno"/>
</body>
</html>