diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2006-03-02 15:09:49 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2006-03-02 15:09:49 +0100 |
commit | 9edac8a88163139d215ee39ec2c907478b9c9402 (patch) | |
tree | 4d621eee627f3a1b8503a63c900441914340bc54 /lib | |
parent | 604e4efa6ac936fef36f3676738fb630abb78982 (diff) | |
download | rpg-9edac8a88163139d215ee39ec2c907478b9c9402.tar.gz rpg-9edac8a88163139d215ee39ec2c907478b9c9402.tar.bz2 |
no more document.write for progressbar
darcs-hash:20060302140949-6e07b-d85f1e3f8989bd5fe8464f4f82ef8a14f8722eff.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scripts/script.js | 18 |
1 files changed, 10 insertions, 8 deletions
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 <andi@splitbrain.org> */ -function showLoadBar(){ - if(document.getElementById){ - document.write('<img src="'+DOKU_BASE+'lib/images/loading.gif" '+ - 'width="150" height="12" id="dw__loading" />'); +function showLoadBar(id){ + obj = $(id); + + if(obj){ + obj.innerHTML = '<img src="'+DOKU_BASE+'lib/images/loading.gif" '+ + 'width="150" height="12" alt="..." />'; + obj.style.display="block"; } } @@ -141,10 +144,9 @@ function showLoadBar(){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function hideLoadBar(){ - if(document.getElementById){ - $('dw__loading').style.display="none"; - } +function hideLoadBar(id){ + obj = $(id); + if(obj) obj.style.display="none"; } /* |