Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Mise à jour d'un champs texte par un autre

1 réponse
Avatar
function Maj(Champ_Source,Champ_Cible)

{

// test ci dessous en dur : ça fonctionne


//document.forms.form1.elements['Nom_Prenom2'].value=
document.form1.elements[Champ_Source.name].value;

// mais ci dessous en dynamique ça marche pas :-(((

eval("document.forms.forml.elements['"+Champ_Cible+"']").value=document.form1.elements[Champ_Source.name].value;

}

Par cette fonction je cherche a mettre a jour le champ cible par le champs
source.

J'appelle ma fonction ..... onblur= (This,'Nom_Champ_Cible')



Où me trompe je ??

1 réponse

Avatar
Merci j'ai ma réponse
Fabien
<..> a écrit dans le message de news:
42398fc5$0$25023$

function Maj(Champ_Source,Champ_Cible)

{

// test ci dessous en dur : ça fonctionne


//document.forms.form1.elements['Nom_Prenom2'].value > document.form1.elements[Champ_Source.name].value;

// mais ci dessous en dynamique ça marche pas :-(((

eval("document.forms.forml.elements['"+Champ_Cible+"']").value=document.form1.elements[Champ_Source.name].value;

}

Par cette fonction je cherche a mettre a jour le champ cible par le champs
source.

J'appelle ma fonction ..... onblur= (This,'Nom_Champ_Cible')



Où me trompe je ??