0

I am currently using the Jquery UI bundle to fill in the Autocomplete search parameters in an 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 now is that all the username and other sensitive data that I have appears on the html/js file on the front end code.

I would like to protect this information + i do not want the code to load all user data every time it loads the search page.

Is there an alternate way to use this autocomplete/ to index autocomplete directly from the server-side? I am using Ruby on Rails for my server side.

Venomoustoad
  • 1,203
  • 1
  • 14
  • 38
  • use ajax to pull data from server side and then bind it up with userfirstnameTags and userlastnameTags .... – iJade Sep 04 '13 at 08:09
  • http://stackoverflow.com/questions/5077409/jquery-ui-autocomplete-server-side-example-what-does-a-request-json-response-lo – Neeraj Sep 04 '13 at 08:10

1 Answers1

1

Jquery auto-completer gives you the option to load the data from server. Checkout this link http://jqueryui.com/autocomplete/#remote

techvineet
  • 5,041
  • 2
  • 30
  • 28