I am trying to integrate Jquery autocomplete functionality in my application. The required js files are included as below:
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-1.8.3.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery.ui.autocomplete.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-ui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/script.js"></script>
The 'scripts.js' file is the application specific file containing code as below:
$(document).ready(function() {
$('#aisleFrom').autocomplete({
url: '/StoreMapperApp/MapPickingZone.action?autocomplete=',
minChars: 0,
max: 10,
width: 150,
scroll: true,
cacheLength: 0
}).focus(function() {
$(this).autocomplete('search', $(this).val())
});
});
However, I get an error as below in the jquery-ui.min.js file when I try to type anything the text field having the id 'aisleFrom':
TypeError: this.source is not a function ...complete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},...
Can someone please advise?