<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="/js/jquery.bgiframe.pack.js"></script> <script type="text/javascript" src="/js/jquery.autocomplete.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("form.enrol-form input#house").autocomplete( '/js-ac/anon/residential-address', { width:300, requestType:'POST', dataType:'json', minTest:function(str) { if(str.match(/\S\s+\S\S\S/) || str.length > 6) return true; return false; }, matchSubset:false, matchContains:false, highlight: false, scrollHeight:220, scroll:true, max:100, cacheLength:1, autoFill:false } ).result(function(event, rec) { $("form.enrol-form input#house").val(rec.house_number); $("form.enrol-form input#street_name").val(rec.street_name); $("form.enrol-form input#town_suburb_name").val(rec.town_city); $("form.enrol-form input#town_suburb_name").focus(); }); }); </script> <link rel="stylesheet" type="text/css" href="/style/jquery.autocomplete.css">