Pb avec IE4

Fermé
ankou - 27 sept. 2001 à 11:42
 ankou - 27 sept. 2001 à 16:11
Dans une fonction javascript, je réécris le contenu d'un span en utilisant un .innerHTML mais cela ne marche pas! J'aimerais savoir si le .innerHTML est supporté par IE4 car en IE5 ca marche!

Si qques a une solution!
merci bcp!

Voici mon code:

if (JSdom) //pour IE5
{
JSpos = document.getElementById(JSidAnchor);
JSSpanLeft = getLeft(JSpos);
JSSpanTop = getTop(JSpos);
document.getElementById(JSidSpan).style.left = JSSpanLeft;
document.getElementById(JSidSpan).style.top = JSSpanTop;
document.getElementById(JSidSpan).style.visibility = 'visible';
document.getElementById(JSidSpan).innerHTML = contenu;
}
else if (JSie4) //pour ie4
{
JSpos = document.all[JSidAnchor];
JSSpanLeft = getLeft(JSpos);
JSSpanTop = getTop(JSpos);
document.all[JSidSpan].style.posleft = JSSpanLeft;
document.all[JSidSpan].style.postop = JSSpanTop;
document.all[JSidSpan].style.visibility = 'visible';
document.all[JSidSpan].innerHTML = contenu;
}

1 réponse

Bobinours Messages postés 2898 Date d'inscription jeudi 26 avril 2001 Statut Membre Dernière intervention 21 mars 2013 503
27 sept. 2001 à 16:09
ankou : oui IE4 gère "inneHTML".

Voir : http://www.dhtmlnirvana.com/alchemy/externalload.htm

-= Bobinours =-
0
merci bcp bobinours mais j'ai réglé le pb!
Merci d'avoir répondu, c'est sympa!
0