shuhui hung

Greenhorn
+ Follow
since Mar 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by shuhui hung

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>
Dear friend:
thank for helping. i know how to do this.
i think i will use string.charAt(0) to compare
13 years ago
Dear Friend:
this is a javascrip code,how can i transfer to java? i try but not work. thank for helping
String id="AB09876541"

/* java scrip code */
if ( id.substr(0,1)<"A" ||id.substr(0,1)>"Z" ) return false;

/* java * this is not work in java ,how to modify ?/

if ( id.substring(0,1)<"A" ||id.substring(0,1)>"Z" ) return false;
13 years ago