diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-04-09 19:16:37 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-04-09 19:16:37 +0200 |
commit | 694edecda81a3cdf5e98bccfbde9fdfad85c223f (patch) | |
tree | 590237a3e04143a9fa50a68eb33ede17ddcecc9f /lib/scripts/index.js | |
parent | 50fbebce669f92881bd56ae5d47c0c3d92d898aa (diff) | |
download | dokuwiki-694edecda81a3cdf5e98bccfbde9fdfad85c223f.tar.gz dokuwiki-694edecda81a3cdf5e98bccfbde9fdfad85c223f.zip |
fixed AJAX in index for IE FS#1367
darcs-hash:20080409171637-7ad00-1a76786332c0b44ae6ff1d1b93007afb02fac97e.gz
Diffstat (limited to 'lib/scripts/index.js')
-rw-r--r-- | lib/scripts/index.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/scripts/index.js b/lib/scripts/index.js index 871993c11..4d082898a 100644 --- a/lib/scripts/index.js +++ b/lib/scripts/index.js @@ -25,7 +25,7 @@ index = { var elem = items[i]; // attach action to make the link clickable by AJAX - addEvent(elem,'click',function(event){ return index.toggle(event,this); }); + addEvent(elem,'click',function(e){ return index.toggle(e,this); }); } }, @@ -37,7 +37,7 @@ index = { * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> */ - toggle: function(event,clicky){ + toggle: function(e,clicky){ var listitem = clicky.parentNode.parentNode; // if already open, close by removing the sublist @@ -45,6 +45,7 @@ index = { if(sublists.length && listitem.className=='open'){ sublists[0].style.display='none'; listitem.className='closed'; + e.preventDefault(); return false; } @@ -52,6 +53,7 @@ index = { if(sublists.length && listitem.className=='closed'){ sublists[0].style.display=''; listitem.className='open'; + e.preventDefault(); return false; } @@ -80,8 +82,8 @@ index = { } }; ajax.runAJAX(clicky.search.substr(1)+'&call=index'); + e.preventDefault(); return false; - } }; |