- How to pass the parameter via Ajax Calling URL....
Here you can get the value from term Its realyy fantastic to have this thing in ajax....
****************************************************
$(document).ready(function() {
$(function() {
$("#search").autocomplete({
source : function(request, response) {
$.ajax({
url : "SearchController",
type : "GET",
data : {
term : request.term
},
dataType : "json",
success : function(data) {
response(data);
}
});
}
});
});
});
*******************************************************
in controller get the value...
try { String term = request.getParameter("term");
System.out.println("Data from ajax call " + term); }
catch (Exception e) {
System.err.println(e.getMessage());
}
*************************************************************
Thanks
Pavan (P1)
nice pawan...
ReplyDelete