Hi there

I have a jQuery autocomplete widget that uses some json formatted data in my html page but would like to have this json data saved as a separate external file.

I cannot seem to figure out how to do this (I have looked at the examples on the jQuery page but just cannot seem to get it working).

If I want to save the json data in a file called data.json for example, how must I change the source parameters to point to this data?

Any help would be really appreciated!

Current code below:-

<script src="ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery-1.7.1.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.core.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.widget.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.position.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.autocomplete.min.js"></script>
<link rel="stylesheet" href="http://www.jqueryautocomplete.com/js/jquery/smoothness/jquery-ui-1.8.16.custom.css"/>
  .ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    /* prevent horizontal scrollbar */
    overflow-x: hidden;
	font-size: 10pt;
  /* IE 6 doesn't support max-height
   * we use height instead, but this forces the menu to always be this tall
  * html .ui-autocomplete {
    height: 300px;
	font-size: 10pt;
var data = [
						{"label":"Aragorn", "actor":"Viggo Mortensen"},
						{"label":"Arwen", "actor":"Liv Tyler"},
						{"label":"Bilbo Baggins", "actor":"Ian Holm"},
						{"label":"Boromir", "actor":"Sean Bean"},
						{"label":"Frodo Baggins", "actor":"Elijah Wood"},
						{"label":"Gandalf", "actor":"Ian McKellen"},
						{"label":"Gimli", "actor":"John Rhys-Davies"},
						{"label":"Gollum", "actor":"Andy Serkis"},
						{"label":"Legolas", "actor":"Orlando Bloom"},
						{"label":"Meriadoc Merry Brandybuck", "actor":"Dominic Monaghan"},
						{"label":"Peregrin Pippin Took", "actor":"Billy Boyd"},
						{"label":"Samwise Gamgee", "actor":"Sean Astin"}

$(function() {

	$( "#search" ).autocomplete({

<input type="text" id="search" />