Incompatibilité entre IE et FireFox
Posté : 24 août 2007, 09:10
Bonjour tout le monde,
J'ai ecris une fonction qui marche trés bien sur IE mais qui m'affiche "NAN" lorsque j'utilise Firefox.
Est ce que quelqu'un peut m'aider SVP.
Merci d'avance.
Voila le code de ma fonction :
J'ai ecris une fonction qui marche trés bien sur IE mais qui m'affiche "NAN" lorsque j'utilise Firefox.
Est ce que quelqu'un peut m'aider SVP.
Merci d'avance.
Voila le code de ma fonction :
Code : Tout sélectionner
function loadTatal(productId,subdoing,implcit)
{
document.getElementById("totPeriod"+productId).value=0;
document.getElementById("totRateCard"+productId).value=0;
document.getElementById("totSDiscount"+productId).value=0;
document.getElementById("totAComm"+productId).value=0;
document.getElementById("totNetNetPrice"+productId).value=0;
document.getElementById("totOtherTaxes"+productId).value=0;
document.getElementById("totIllum"+productId).value=0;
document.getElementById("totAddCost"+productId).value=0;
document.getElementById("totToal"+productId).value=0;
for(var subProductId=0;subProductId<ListOfProdcutALL[productId].length;subProductId++)
{
var values="chekthis"+productId+subProductId;
var nms=document.getElementById(values).checked;
if(nms==true)
{
document.getElementById("totPeriod"+productId).value= parseFloat(document.getElementById("totPeriod"+productId).value)+parseFloat(ListOfProdcutALL[productId][subProductId][0]);
var a=
(( parseFloat(ListOfProdcutALL[productId][subProductId][1]) * parseFloat(ListOfProdcutALL[productId][subProductId][2]) )+
( parseFloat(document.getElementById("totSDiscount"+productId).value) * parseFloat(document.getElementById("totRateCard"+productId).value) ) ) ;
var b=parseFloat(document.getElementById("totRateCard"+productId).value)+parseFloat(ListOfProdcutALL[productId][subProductId][1]);
document.getElementById("totSDiscount"+productId).value=a/b;
var c=
(( parseFloat(ListOfProdcutALL[productId][subProductId][1]) * parseFloat(ListOfProdcutALL[productId][subProductId][3]) )+
( parseFloat(document.getElementById("totAComm"+productId).value) * parseFloat(document.getElementById("totRateCard"+productId).value) ) ) ;
var d=parseFloat(document.getElementById("totRateCard"+productId).value)+parseFloat(ListOfProdcutALL[productId][subProductId][1]);
document.getElementById("totAComm"+productId).value=c/d;
document.getElementById("totNetNetPrice"+productId).value=format(parseFloat(CurrentCoff)*(parseFloat(document.getElementById("totNetNetPrice"+productId).value)+parseFloat(CurrentCoff)*parseFloat(ListOfProdcutALL[productId][subProductId][4])),0,'');
document.getElementById("totOtherTaxes"+productId).value=format((parseFloat(document.getElementById("totOtherTaxes"+productId).value)+parseFloat(CurrentCoff)*parseFloat(ListOfProdcutALL[productId][subProductId][5])),0,'');
document.getElementById("totIllum"+productId).value=format((parseFloat(document.getElementById("totIllum"+productId).value)+parseFloat(CurrentCoff)*parseFloat(ListOfProdcutALL[productId][subProductId][6])),0,'');
document.getElementById("totAddCost"+productId).value=format((parseFloat(document.getElementById("totAddCost"+productId).value)+parseFloat(CurrentCoff)*parseFloat(ListOfProdcutALL[productId][subProductId][7])),0,'');
document.getElementById("totToal"+productId).value=format((parseFloat(document.getElementById("totToal"+productId).value)+parseFloat(CurrentCoff)*parseFloat(ListOfProdcutALL[productId][subProductId][8])),0,'');
document.getElementById("totRateCard"+productId).value=format((parseFloat(document.getElementById("totRateCard"+productId).value)+parseFloat(CurrentCoff)*parseFloat(ListOfProdcutALL[productId][subProductId][1])),0,'');
}
}
}