begin process at 2012 05 30 04:32:30
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Javascript / DHTML / Ajax

 > 

CSS

 > 

Général

 > 

transfère de donnée d'une pop up à la page


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

transfère de donnée d'une pop up à la page

mardi 15 août 2006 à 08:04:49 | transfère de donnée d'une pop up à la page

spiesalex

Salut

voici le script que j'utilise
<html>
<head>
    <title>Palette de couleur (en contruction )</title>
    <script language="JavaScript" type="text/javascript">
    <!--
    function selectColor(color) {
        self.parent.setColor(color);
    }
   
    function InitColorPalette() {
        if (document.getElementsByTagName)
            var x = document.getElementsByTagName('TD');
        else if (document.all)
            var x = document.all.tags('TD');
        for (var i=0;i<x.length;i++) {
            x[i].onmouseover = over;
            x[i].onmouseout = out;
            x[i].onclick = click;
        }
    }
   
    function over() {
        this.style.border='1px dotted white';
    }
   
    function out() {
        this.style.border='1px solid gray';
    }
   
    function click() {
        selectColor(this.id);
    }
    //-->
    </script>
</head>
<body bgcolor="white" onLoad="InitColorPalette()" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0">
<table width="150" height="100" cellpadding="0" cellspacing="1" border="1" align="center">
    <tr>
        <td id="#FFFFFF" bgcolor="#FFFFFF" width="10" height="10"><img width="1" height="1"></td>

        <td id="#FFCCCC" bgcolor="#FFCCCC" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFCC99" bgcolor="#FFCC99" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFFF99" bgcolor="#FFFF99" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFFFCC" bgcolor="#FFFFCC" width="10" height="10"><img width="1" height="1"></td>
        <td id="#99FF99" bgcolor="#99FF99" width="10" height="10"><img width="1" height="1"></td>
        <td id="#99FFFF" bgcolor="#99FFFF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#CCFFFF" bgcolor="#CCFFFF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#CCCCFF" bgcolor="#CCCCFF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFCCFF" bgcolor="#FFCCFF" width="10" height="10"><img width="1" height="1"></td>

    </tr>
    <tr>
        <td id="#CCCCCC" bgcolor="#CCCCCC" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FF6666" bgcolor="#FF6666" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FF9966" bgcolor="#FF9966" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFFF66" bgcolor="#FFFF66" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFFF33" bgcolor="#FFFF33" width="10" height="10"><img width="1" height="1"></td>
        <td id="#66FF99" bgcolor="#66FF99" width="10" height="10"><img width="1" height="1"></td>
        <td id="#33FFFF" bgcolor="#33FFFF" width="10" height="10"><img width="1" height="1"></td>

        <td id="#66FFFF" bgcolor="#66FFFF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#9999FF" bgcolor="#9999FF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FF99FF" bgcolor="#FF99FF" width="10" height="10"><img width="1" height="1"></td>
    </tr>
    <tr>
        <td id="#C0C0C0" bgcolor="#C0C0C0" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FF0000" bgcolor="#FF0000" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FF9900" bgcolor="#FF9900" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFCC66" bgcolor="#FFCC66" width="10" height="10"><img width="1" height="1"></td>

        <td id="#FFFF00" bgcolor="#FFFF00" width="10" height="10"><img width="1" height="1"></td>
        <td id="#33FF33" bgcolor="#33FF33" width="10" height="10"><img width="1" height="1"></td>
        <td id="#66CCCC" bgcolor="#66CCCC" width="10" height="10"><img width="1" height="1"></td>
        <td id="#33CCFF" bgcolor="#33CCFF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#6666CC" bgcolor="#6666CC" width="10" height="10"><img width="1" height="1"></td>
        <td id="#CC66CC" bgcolor="#CC66CC" width="10" height="10"><img width="1" height="1"></td>
    </tr>
    <tr>
        <td id="#999999" bgcolor="#999999" width="10" height="10"><img width="1" height="1"></td>

        <td id="#CC0000" bgcolor="#CC0000" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FF6600" bgcolor="#FF6600" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFCC33" bgcolor="#FFCC33" width="10" height="10"><img width="1" height="1"></td>
        <td id="#FFCC00" bgcolor="#FFCC00" width="10" height="10"><img width="1" height="1"></td>
        <td id="#33CC00" bgcolor="#33CC00" width="10" height="10"><img width="1" height="1"></td>
        <td id="#00CCCC" bgcolor="#00CCCC" width="10" height="10"><img width="1" height="1"></td>
        <td id="#3366FF" bgcolor="#3366FF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#6633FF" bgcolor="#6633FF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#CC33CC" bgcolor="#CC33CC" width="10" height="10"><img width="1" height="1"></td>

    </tr>
    <tr>
        <td id="#666666" bgcolor="#666666" width="10" height="10"><img width="1" height="1"></td>
        <td id="#990000" bgcolor="#990000" width="10" height="10"><img width="1" height="1"></td>
        <td id="#CC6600" bgcolor="#CC6600" width="10" height="10"><img width="1" height="1"></td>
        <td id="#CC9933" bgcolor="#CC9933" width="10" height="10"><img width="1" height="1"></td>
        <td id="#999900" bgcolor="#999900" width="10" height="10"><img width="1" height="1"></td>
        <td id="#009900" bgcolor="#009900" width="10" height="10"><img width="1" height="1"></td>
        <td id="#339999" bgcolor="#339999" width="10" height="10"><img width="1" height="1"></td>

        <td id="#3333FF" bgcolor="#3333FF" width="10" height="10"><img width="1" height="1"></td>
        <td id="#6600CC" bgcolor="#6600CC" width="10" height="10"><img width="1" height="1"></td>
        <td id="#993399" bgcolor="#993399" width="10" height="10"><img width="1" height="1"></td>
    </tr>
    <tr>
        <td id="#333333" bgcolor="#333333" width="10" height="10"><img width="1" height="1"></td>
        <td id="#660000" bgcolor="#660000" width="10" height="10"><img width="1" height="1"></td>
        <td id="#993300" bgcolor="#993300" width="10" height="10"><img width="1" height="1"></td>
        <td id="#996633" bgcolor="#996633" width="10" height="10"><img width="1" height="1"></td>

        <td id="#666600" bgcolor="#666600" width="10" height="10"><img width="1" height="1"></td>
        <td id="#006600" bgcolor="#006600" width="10" height="10"><img width="1" height="1"></td>
        <td id="#336666" bgcolor="#336666" width="10" height="10"><img width="1" height="1"></td>
        <td id="#000099" bgcolor="#000099" width="10" height="10"><img width="1" height="1"></td>
        <td id="#333399" bgcolor="#333399" width="10" height="10"><img width="1" height="1"></td>
        <td id="#663366" bgcolor="#663366" width="10" height="10"><img width="1" height="1"></td>
    </tr>
    <tr>
        <td id="#000000" bgcolor="#000000" width="10" height="10"><img width="1" height="1"></td>

        <td id="#330000" bgcolor="#330000" width="10" height="10"><img width="1" height="1"></td>
        <td id="#663300" bgcolor="#663300" width="10" height="10"><img width="1" height="1"></td>
        <td id="#663333" bgcolor="#663333" width="10" height="10"><img width="1" height="1"></td>
        <td id="#333300" bgcolor="#333300" width="10" height="10"><img width="1" height="1"></td>
        <td id="#003300" bgcolor="#003300" width="10" height="10"><img width="1" height="1"></td>
        <td id="#003333" bgcolor="#003333" width="10" height="10"><img width="1" height="1"></td>
        <td id="#000066" bgcolor="#000066" width="10" height="10"><img width="1" height="1"></td>
        <td id="#330099" bgcolor="#330099" width="10" height="10"><img width="1" height="1"></td>
        <td id="#330033" bgcolor="#330033" width="10" height="10"><img width="1" height="1"></td>

    </tr>
</table>
</body>
</html>


j'aimerai faire une page que lorsqu'on clique sur le lien la palette de couleur s'ouvre (voir le script ci-dessus) et que l'on peut choisir ça couleur ,Une fois choisi la pop up se ferme et le code de la couleur s'affiche dans une boite de texte sur ma page qui ressemble un peu à sa:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>

   <head>
      <title>choisir sa couleur</title>
      <meta name="description" content="test" />
      <meta name="keywords" content="test" />
      <meta http-equiv="generator" content="PHP Designer 2006 - BETA" />
   </head>

   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a href="pop up" titre ="ouvrir la palette de couleur">#</a><input type="text" name="couleur"/>
   </body>
</html>


merci beaucoup à ceux qui vont m'aider
mardi 15 août 2006 à 15:30:47 | Re : transfère de donnée d'une pop up à la page

bultez

Membre Club




bonjour,

   pop-up : regarder window.open
            et ce pop-up s'adresse à la page qui l'a ouverte
               avec window.opener...

   mais de plus en plus de personnes refusent les pop-up
   il vaudrait peut-être (?) mieux utiliser un div, un span
      caché que l'on montre/cache si nécessaire
   de très nombreux exemples existent dans les sources
      de ce site ( recerche info-bulle par exemple ? )

cordialement   Bul   
Site


Cette discussion est classée dans : function, page, couleur, pop, document


Répondre à ce message

Sujets en rapport avec ce message

page unique [ par mimosa803 ] bonsoir à tous , bon j'ai un petit problème: j'ai un liste déroulante nommée"liste" ,je veux que lorsque je séléctionne un chiffre, sa table de multip function et document.write [ par Dromadolf ] Bonjour à tous ! Voilà il fait beau en ce vendredi 4 juillet sur la côte d'azur, mais voilà ce n'est pas tout j'ai un petit soucis. J'ai une page php Problème pour changer le document.bgColor dans IE [ par scratchdesign ] Bonjour,J'ai réalisé un site web en flash. Dans l'une des rubriques du site web, je souhaitais changer la couleur de fond de ma page HTML ainsi que la Conflit balises DIV [ par finelarme ] Bonjour, J'ai un problème pour "combiner" deux balises DIV. Il y'à deux actions dans ma page : un compte à rebours que j'ai paramêtré et un fader su erreut this [ par vinise ] Bonjour a tous jai un petiti probleme avec prototype:background : function()    {        this.BG = document.createElement('div');        this.BG.class Appeler du javascript dans une page ajax [ par Torez ] Salut,J'ai une page appelée avec AJAX et quand je note un simple test :document.write("test");Ca ne fonctionne pas.J'ai essayé avec eval() comme cec probleme avec un script [ par angelimad ] bonjour,je connais pas trop sur javascript, j'ai telechargé un script pour un menu horizentale d'ici, et je l'ai integré dans mon site, il marche tres ie tes vraiment le supo de satan [ par parweb ] bonjour a tous,quelqu'un pourrait m'expliquer pourquoi le code ci-dessous fonctionne trés bien avec firefox/chrome et pas avec IEje précise que ce cod Probléme Pop Up [ par sunshine59136 ] Euh je savais pas trop ou poster alors j'espére que je ne me suis pas tromper =) . Voila depuis le debut d'aprés midi je cherche une solution a mon pr augmenter variable et si plus grande que variable =0 ? [ par frvfrvfrvfrv ] bonjour à tous,voilà deja mon code source.function milieucentre(){pf = ((window.innerWidth!=undefined) ? window.innerWidth : document.documentElem


Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,967 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales