Bonjour,
Pourquoi quand je sort d'une boucle for, la variable Input_Question revient à l'ancienne valeur.
comment corriger ceci.
merci beaucoup
@+
<?xml version='1.0' encoding="UTF8" ?>
<racine>
<c In="slt" Out="salut" />
</racine>
Input_Question= slt;
function open_Abreviation(Input_Question)
{
xml_doc0=new XML;
xml_doc0.ignoreWhite = true;
xml_doc0.load("toto.xml");
xml_doc0.onLoad = function()
{
for (var i = 0; i<xml_doc0.firstChild.childNodes.length; i++)
{
Work =xml_doc0.firstChild.childNodes[i].attributes.In.toString();
if(replace_Accent(Work) == Input_Question.toString())
{
Temp_Out=xml_doc0.firstChild.childNodes[i].attributes.Out.toString();
Input_Question = Input_Question.replace(Work, Temp_Out);
Reponse.text+=Input_Question+"++\n"; //// <--- ici j'ai bien la donnée voulu : salut
}
}
}
Reponse.text+=_root.Input_Question+"+++\n"; /// <--- je n'ai plus la valeur bonne au dessus, j'ai : slt
return _root.Input_Question;
}
Input_Question=open_Abreviation(Input_Question);
Reponse.text+=Input_Question+"*\n"; ///// <------- je n'obtient pas la valeur que je voudrais, j'ai : slt