summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-04-09 19:16:37 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-04-09 19:16:37 +0200
commit694edecda81a3cdf5e98bccfbde9fdfad85c223f (patch)
tree590237a3e04143a9fa50a68eb33ede17ddcecc9f /lib/scripts
parent50fbebce669f92881bd56ae5d47c0c3d92d898aa (diff)
downloadrpg-694edecda81a3cdf5e98bccfbde9fdfad85c223f.tar.gz
rpg-694edecda81a3cdf5e98bccfbde9fdfad85c223f.tar.bz2
fixed AJAX in index for IE FS#1367
darcs-hash:20080409171637-7ad00-1a76786332c0b44ae6ff1d1b93007afb02fac97e.gz
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/index.js8
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;
-
}
};