From 9edac8a88163139d215ee39ec2c907478b9c9402 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 2 Mar 2006 15:09:49 +0100 Subject: no more document.write for progressbar darcs-hash:20060302140949-6e07b-d85f1e3f8989bd5fe8464f4f82ef8a14f8722eff.gz --- inc/html.php | 10 ++++++---- lib/scripts/script.js | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/inc/html.php b/inc/html.php index 2fc6bfe37..edfc5a2cb 100644 --- a/inc/html.php +++ b/inc/html.php @@ -332,11 +332,12 @@ function html_search(){ flush(); //show progressbar - print '
'; + print '
'; + print '
'; print ''; - print '
'; + flush(); //do quick pagesearch $data = array(); @@ -379,8 +380,9 @@ function html_search(){ //hide progressbar print ''; + flush(); } /** diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 834f0f4a4..24dc025bc 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -129,10 +129,13 @@ function prependChild(parent,element) { * * @author Andreas Gohr */ -function showLoadBar(){ - if(document.getElementById){ - document.write(''); +function showLoadBar(id){ + obj = $(id); + + if(obj){ + obj.innerHTML = '...'; + obj.style.display="block"; } } @@ -141,10 +144,9 @@ function showLoadBar(){ * * @author Andreas Gohr */ -function hideLoadBar(){ - if(document.getElementById){ - $('dw__loading').style.display="none"; - } +function hideLoadBar(id){ + obj = $(id); + if(obj) obj.style.display="none"; } /* -- cgit v1.2.3