ça ne marche pas, dans ton exemple, tu crées les deux popup en un seul coup pendant la même exécution.
Chez moi, le popup w2 est crée après par un clic de souris (j'ai appelé mon popup f1 pour tester).
dans la fenêtre d'origine, j'ai ça :
a href="../../eGuepard/lister,,,,,série-S1885.html"
onclick="window.open('../../eGuepard/lister,,,,,série-S1885.html', 'fiche', 'toolbar=no, location=no, status=yes, scrollbars=yes,resizable=yes, width=750, height=800, left=450, top=60'); return false;"
onmouseout="window.status='';" target="fiche" Clavier /a
dans la fenêtre fiche, j'ai mis :
span id="newcompo" /span
et j'ai un autre lien dans la fenêtre d'origine :
a href="../../eGuepard/danshost,21118.html"
onclick="f1.window.open('../../eGuepard/danshost,21118.html', 'danshost', 'toolbar=no, location=no, status=yes, scrollbars=yes,resizable=yes, width=75, height=80, left=450, top=60'); return false;"
onmouseout="window.status='';" target="danshost" +c /a
la page danshost.html voudrait écrire dans la page lister.html :
script type="text/javascript"
window.opener.f1.document.getElementById('newcompo').innerHTML = "nouveau texte";
/*this.close();*/
/script
et j'ai comme erreur :
Error: window.opener.f1.document.getElementById("newcompo") has no properties
[^] # Re: Ben, je ne vois pas où c'est difficile....
Posté par rootix . En réponse au message javascript target et document. Évalué à 2.
Chez moi, le popup w2 est crée après par un clic de souris (j'ai appelé mon popup f1 pour tester).
dans la fenêtre d'origine, j'ai ça :
a href="../../eGuepard/lister,,,,,série-S1885.html"
onclick="window.open('../../eGuepard/lister,,,,,série-S1885.html', 'fiche', 'toolbar=no, location=no, status=yes, scrollbars=yes,resizable=yes, width=750, height=800, left=450, top=60'); return false;"
onmouseout="window.status='';" target="fiche" Clavier /a
dans la fenêtre fiche, j'ai mis :
span id="newcompo" /span
et j'ai un autre lien dans la fenêtre d'origine :
a href="../../eGuepard/danshost,21118.html"
onclick="f1.window.open('../../eGuepard/danshost,21118.html', 'danshost', 'toolbar=no, location=no, status=yes, scrollbars=yes,resizable=yes, width=75, height=80, left=450, top=60'); return false;"
onmouseout="window.status='';" target="danshost" +c /a
la page danshost.html voudrait écrire dans la page lister.html :
script type="text/javascript"
window.opener.f1.document.getElementById('newcompo').innerHTML = "nouveau texte";
/*this.close();*/
/script
et j'ai comme erreur :
Error: window.opener.f1.document.getElementById("newcompo") has no properties
(j'ai viré les > et les < car ça s'affiche pas)