manage 0.5.1. plugins site view expand NOK with IE6

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
polletj
Cacti User
Posts: 54
Joined: Wed Aug 30, 2006 1:18 am
Location: Antwerp/Belgium

manage 0.5.1. plugins site view expand NOK with IE6

Post by polletj »

The list expand is working with mozilla but not with the Internet explorer,

gives a runtime error at line 89 in manage.php

Error: 'style' is null or not an object.

Solutions for this somewhere ??


Cheers
Johan
polletj
Cacti User
Posts: 54
Joined: Wed Aug 30, 2006 1:18 am
Location: Antwerp/Belgium

Problem solved...

Post by polletj »

function toggleVisibility(tagId) {
if (!document.getElementById) {
msg = 'Votre navigateur est trop ancien pour profiter de votre visite\n';
msg += 'Veuillez le mettre à jour ou vous en procurer un autre';
return false;
}

var tagToToggle;

//try { // On tente de récupérer la balise cible dont on doit changer la visibilité

tagToToggle = document.getElementById(tagId).style.visibility;

//}catch (e){ // Si échec de la récupération de la balise cible
// alert('Je n\'ai pas pu trouver la balise cible');
//}

try { // Seulement pour les non IE
if (document.getElementById(tagId).style.display == 'none') {
document.getElementById(tagId).style.display = 'inline';
}else{
document.getElementById(tagId).style.display = 'none';
}
}catch (e){}

// Pour IE
if (document.getElementById(tagId).style.visibility == 'hidden') {
document.getElementById(tagId).style.visibility = 'visible';
}else{
document.getElementById(tagId).style.visibility = 'hidden';
}

}

Replaces the original function and is working now
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests