/** * getresult - JavaScript Code */ // global variables var acListTotal = 0; var acListCurrent = -1; var acDelay = 0; var acURL = null; var acSearchId = null; var acResultsId = null; var acSearchField = null; var acResultsDiv = null; var acResultURL = null; //SPA Per var divExpanded = true; // parameters: the id of the input field, the id of the results div, // the URL of the remote script and the Q&A function showResult(results_id, get_url){ // initialize vars acResultsId = "#" + results_id; acResultsDiv = $(acResultsId); //alert(part); // get remote data as JSON //$.getJSON(acURL, function(json){ $.get(get_url, function(json){ // get the total of results var ansLength = acListTotal = json.length; //alert(ansLength); // if there are results populate the results div if(ansLength > 0){ var newData = ''; // create a div for each result for(i=0; i < ansLength; i++) { newData += '