summaryrefslogtreecommitdiff
path: root/roundcubemail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-12 18:06:05 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-12 18:06:05 +0000
commit01e201ddeb2d8381fd62ad69d729f7458865eb0f (patch)
tree6a8112933b74928fe244b4be5f00f4ef875e7488 /roundcubemail
parentca7e6afc99703003465bf3b63dc7aecda1be6fe5 (diff)
-better getElementById wrapper for IE
git-svn-id: https://svn.roundcube.net/trunk@1780 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
-rw-r--r--roundcubemail/program/js/common.js16
1 files changed, 4 insertions, 12 deletions
diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js
index 649779746..1a5c0519c 100644
--- a/roundcubemail/program/js/common.js
+++ b/roundcubemail/program/js/common.js
@@ -639,21 +639,13 @@ if (bw.ie)
document._getElementById = document.getElementById;
document.getElementById = function(id)
{
- var a = [];
+ var i = 0;
var o = document._getElementById(id);
- while (o.id != id)
- {
- a.push({i:o.id,e:o});
- o.id = '';
- o = document._getElementById(id);
- if (!o) return o;
- }
-
- for (j=0,jj=a.length; j<jj; j++)
- a[j].e.id = a[j].i;
+ if (o.id != id)
+ while ((o = document.all[i]) && o.id != id)
+ i++;
- a = null;
return o;
}
}