getElementById bug sous IE6
Voilà ajoute donc ça dans ta balise <script></script> 8-)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| if (/msie/i.test (navigator.userAgent))
{
document.nativeGetElementById = document.getElementById;
document.getElementById = function(id)
{
// Get element using native method
var elem = document.nativeGetElementById(id);
if (elem)
{
// If id match, return element
if (elem.attributes['id'].value == id)
{
return elem;
}
// Otherwise look for the right one
else
{
for (var i = 1; i < document.all[id].length; i++)
{
if (document.all[id][i].attributes['id'].value == id)
{
return document.all[id][i];
}
}
}
}
return null;
}
} |