• # Ben, je ne vois pas où c'est difficile....

    Posté par . En réponse au message javascript target et document. Évalué à 1.

    Voici ce que j'ai codé, en espérant que ça répond à ta question :

    Dans un fichier html, j'ai ce code javascript qui ouvre 2 popups :

    <html>
    <head>
    <script type="text/javascript">
    w1 = window.open ('f1.html', 'f1', 'width=100,height=100');
    w2 = window.open ('f2.html', 'f2', 'width=100,height=100');
    </script>
    </head>
    <body>
    </body>
    </head>

    Le code de f1.html :

    <html>
    <head>
    <title>f1.html</title>
    </head>
    <body>
    </body>
    </html>


    Enfin, le code de f2.html :

    <html>
    <head>
    <title>f2.html</title>
    <script type="text/javascript">
    function changewindow (name)
    {
    window.opener.w1.document.write ('Texte créé depuis f2.html');
    }
    </script>
    </head>
    <body onload="changewindow('f1');">
    </body>
    </html>


    Bons essayages et bon codage !