diff options
author | Markus Koch <markus@notsyncing.net> | 2020-04-19 20:21:13 +0200 |
---|---|---|
committer | Markus Koch <markus@notsyncing.net> | 2020-04-19 20:21:13 +0200 |
commit | 4c7590a212c3900b6f6bf37d00afd6a0c72b84b3 (patch) | |
tree | 6d794320a0622cca89cb0e46dbc843c5bd130f5a /htdocs | |
parent | e1baa251fb6ef55adbd664bf80c50601ce68807f (diff) | |
download | lifomapserver-4c7590a212c3900b6f6bf37d00afd6a0c72b84b3.tar.gz lifomapserver-4c7590a212c3900b6f6bf37d00afd6a0c72b84b3.tar.bz2 lifomapserver-4c7590a212c3900b6f6bf37d00afd6a0c72b84b3.zip |
Only display search results
Diffstat (limited to 'htdocs')
-rw-r--r-- | htdocs/mapscript.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js index 99f0854..46cd08a 100644 --- a/htdocs/mapscript.js +++ b/htdocs/mapscript.js @@ -235,6 +235,7 @@ function htmlEntities(str) { var regex; function search(e) { var query = htmlEntities(document.getElementById("search_query").value); + document.getElementById('search_results').innerHTML = ""; if (query.length > 0 || e.key == "Enter") { results = document.createElement("ul"); for (var i = 0; i < layers._layers.length; i++) { @@ -257,10 +258,9 @@ function search(e) { } } } - document.getElementById('search_results').innerHTML = "Search results for " + query; document.getElementById('search_results').appendChild(results); - return false; } + return false; } L.MyControl = L.Control.extend({ |