Instant search and visualization in HTML and Javascript