Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function displayData(resultData) {
var results = resultData.results;
if (results == 'No results') {
document.geElementById('divResults').innerHTML = "No result(s) found";
return false
}
else {
// Set the divResults class as open to slide in from off screen
var drawer = document.getElementById("divResults");
drawer.classList.toggle('open');
/////
var htmlStr = "<table>";
htmlStr = htmlStr + "<tr><th>Search Value </th></tr>";
for (var i = 0; i < results.length; i++) {
var row = results[i];
htmlStr = htmlStr + "<tr>";
htmlStr = htmlStr + "<td>";
htmlStr = htmlStr + "<a href='JavaScript:ZoomTo(" + row.Y + "," + row.X + ")'>" + row.SEARCHVAL + " (" + parseFloat(row.X).toFixed(4) + " , " + parseFloat(row.Y).toFixed(4) + ")" + "</a>";
htmlStr = htmlStr + "</td>";
htmlStr = htmlStr + "</tr>";
}
htmlStr = htmlStr + "</table>";
document.getElementById("divResults").innerHTML = htmlStr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.