From: Anders S. Mortensen Date: Mon, 8 Jan 2007 11:13:07 +0000 (+0000) Subject: Record display works. X-Git-Tag: before.append.child~17 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=015261c103f2b4f8e4d06220605a2053e52a1249;p=pazpar2-moved-to-github.git Record display works. --- diff --git a/www/demo/search.js b/www/demo/search.js index b5b462a..41b19b5 100644 --- a/www/demo/search.js +++ b/www/demo/search.js @@ -1,4 +1,4 @@ -/* $Id: search.js,v 1.6 2007-01-05 14:56:05 sondberg Exp $ +/* $Id: search.js,v 1.7 2007-01-08 11:13:07 sondberg Exp $ * --------------------------------------------------- * Javascript container */ @@ -199,13 +199,15 @@ function show_records() for (i = 0; i < hits.length; i++) { var mk = hits[i].getElementsByTagName("title"); - - body.innerHTML += ''; + var html = ''; + var field = ''; if (mk[0]) { - var field = mk[0].childNodes[0].nodeValue; + field = mk[0].childNodes[0].nodeValue; } - body.innerHTML += field + ''; + + html += field + ''; + body.innerHTML += html; } body.innerHTML += '';