From: Anders S. Mortensen Date: Wed, 10 Jan 2007 12:20:51 +0000 (+0000) Subject: More responsive record view. X-Git-Tag: rather.stable.2007.01.11~10 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=1ef02968c63f06e9b5a4a08f5c7474039a9941db;p=pazpar2-moved-to-github.git More responsive record view. --- diff --git a/www/demo/search.js b/www/demo/search.js index 81be27d..c996c1b 100644 --- a/www/demo/search.js +++ b/www/demo/search.js @@ -1,4 +1,4 @@ -/* $Id: search.js,v 1.14 2007-01-10 12:15:46 sondberg Exp $ +/* $Id: search.js,v 1.15 2007-01-10 12:20:51 sondberg Exp $ * --------------------------------------------------- * Javascript container */ @@ -197,6 +197,12 @@ function create_element (name, cdata) { } +function clear_cell (cell) { + while (cell.hasChildNodes()) + cell.removeChild(cell.firstChild); +} + + function show_records() { if (xshow.readyState != 4) @@ -205,8 +211,8 @@ function show_records() var xml = xshow.responseXML; var body = document.getElementById("body"); var hits = xml.getElementsByTagName("hit"); - - body.innerHTML = ''; + + clear_cell(body); if (!hits[0]) // We should never get here with blocking operations {