ruby on rails - How do I run autocomplete directly from the server instead of the default JQuery UI autocomplete? -
i using jquery ui bundle fill in autocomplete search parameters in input html box.
html file:
<script src="js/jquery-1.9.1.js"></script> <script src="js/jquery-ui-1.10.3.custom.js"></script> <script> $(function() { var userfirstnametags = [ "john", "katy", "will", "shrek", ]; var userlastnametags = [ "snow", "perry", "smith", "rooney", ]; $( "#user_first_name" ).autocomplete({ source: userfirstnametags }); }); </script>
the issue right username , other sensitive data have appears on html/js file on front end code.
i protect information + not want code load user data every time loads search page.
is there alternate way use autocomplete/ index autocomplete directly server-side? using ruby on rails server side.
jquery auto-completer gives option load data server. checkout link http://jqueryui.com/autocomplete/#remote
Comments
Post a Comment