From 1ef02968c63f06e9b5a4a08f5c7474039a9941db Mon Sep 17 00:00:00 2001 From: "Anders S. Mortensen" Date: Wed, 10 Jan 2007 12:20:51 +0000 Subject: [PATCH] More responsive record view. --- www/demo/search.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 { -- 1.7.10.4