IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Ouverture de popup


Sujet :

JavaScript

  1. #1
    Membre du Club
    Inscrit en
    Avril 2008
    Messages
    369
    Détails du profil
    Informations forums :
    Inscription : Avril 2008
    Messages : 369
    Points : 61
    Points
    61
    Par défaut Ouverture de popup


    Je ne suis pas sur d'avoir posté au bon endroit si ce n'est pas le cas excusez moi

    Donc voila j'ai mapage.php ou dedans il ya un tableau avec des bouton radio et 3 bouton deux nous interesse (modifier et supprimer)

    En effet lorsque l'utilisateur coche un choix et qu'il clic sur supprimer ou modifier un popup s'ouvre et voici le problème

    Je veut récupérer ma clé primaire dans ce popup ($CHOIX)
    et hélas je n'y arrive pas un popup s'ouvre bien mais vide et le navigateur m'ouvre une autre page ou il y a bien tout les données mais moi je veut que ce soit dans le popup

    bref je vous met le code pour que vous voyez ce que j'ai fait et pour que ce soit plus clair

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
     
    <?php 
     
    require('Connexion.php'); 
    require('Requete.php'); 
     
    //--------------- Requete du tableau des arrêts chaîne ---------------// 
     
    $sql0="SELECT * FROM ARRET_CHAINE WHERE DEBUT =#$date#"; 
     
    $rs = odbc_exec($conn,$sql0) or die('Erreur SQL : <br />'.$sql0); 
     
    while (odbc_fetch_row($rs)) 
    { 
    $CHOIX = odbc_result($rs,"NUMERO_ARRET_CHAINE"); 
    } 
     
    echo "<input name=\"Modifier\" type=\"submit\" value=\"Modifier\" onclick=\"window.open('formulaire.php?id=".$CHOIX."', 'utilisateur', config='width=600, height=600, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no');\" type=\"button\">"; 
    ?>

  2. #2
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 220
    Points
    91 220
    Billets dans le blog
    20
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    window.open('formulaire.php?id=".$CHOIX."', 'utilisateur', config='width=600, height=600, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no');
    config='...' ???
    Ce serait plutôt :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    window.open('formulaire.php?id=".$CHOIX."', 'utilisateur', 'width=600, height=600, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no');

  3. #3
    Membre du Club
    Inscrit en
    Avril 2008
    Messages
    369
    Détails du profil
    Informations forums :
    Inscription : Avril 2008
    Messages : 369
    Points : 61
    Points
    61
    Par défaut
    Merci bovino pour cette remarque, j'étais passé à coté.

    Par contre je pense que le problème est un peu plus compliqué

    Je me paermet de mettre le code de toute ma page pour que vous puissiez voir si le problème ne vient pas d'autre part.

    Je rééxplique le problème

    Je souhaite que quand l'utilisateur coche un boutton et qu'il clic sur modifier ou supprimer on récupère les informations des variables dans le popup.
    Hors la le navigateur ouvre bien le popup mais les variables n'y sont pas et donc le navigateur me charge une autre page avec ces variables et je cherche pourquoi.
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
     
    <html>
    <!################################################################################################################################>
     
    	<head>
     
      		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
     
    		<title>Utilisateur</title>
     
    		<link rel="stylesheet" media="screen" type="text/css" title="identification" href="Application.css">
     
    	</head>
     
    <!################################################################################################################################>
    <form method="post" action="formulaire.php">
     
    <body onload="runClock()">
     
     
     
    <!--------------- Bannière --------------->
     
    <div id="ban2" >  </div>
     
    <!--------------- Boutton --------------->
     
    <div style="text-align: center;">
     
    	<input name="lien1" value="Arr&ecirc;t cha&icirc;ne" onclick="window.open('Form_utilisateur.php', 'utilisateur', config='width=700, height=600, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no');" type="button"> &nbsp;&nbsp;
     
    	<?php
     
    	require('Connexion.php');
    	require('Requete.php');
     
    	//--------------- Requete du tableau des arrêts chaîne ---------------//
     
    	$sql0="SELECT * FROM ARRET_CHAINE WHERE DEBUT =#$date#";
     
    	$rs = odbc_exec($conn,$sql0) or die('Erreur SQL : <br />'.$sql0);
     
    	while (odbc_fetch_row($rs)) 
    			{ 
    				$CHOIX = odbc_result($rs,"NUMERO_ARRET_CHAINE");
    			}
     
    	echo "<input name=\"Modifier\" type=\"submit\" value=\"Modifier\" onclick=\"window.open('formulaire.php?id=".$CHOIX."', 'utilisateur', 'width=600, height=600, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no');\" >";
    	?> &nbsp;&nbsp;
    	<?php
    	echo "<input name=\"Supprimer\" type=\"submit\" value=\"Supprimer\" onclick=\"window.open('formulaire.php?id=".$CHOIX."', 'utilisateur', 'width=600, height=600, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no');\" >";
    	?> &nbsp;&nbsp;
    	<input name="lien4" value="Imprimer" onclick="edition();return false;"type="button">
     
    </div>
     
    <br>
     
    <!--------------- Heure défilant --------------->
     
    <div id="time"></div>
     
    <!--------------- Tableau de gestion des arrêts chaîne --------------->
    <?php
     
    $sql1="SELECT * FROM ARRET_CHAINE WHERE DEBUT =#$date#";
    $req = odbc_exec($conn,$sql1) or die('Erreur SQL : <br />'.$sql1);
    //--------------- Tableau des arrêts chaîne ---------------//
     
    echo "<div style='overflow-y: scroll; height: 305'> ";
     
    echo "<table border='0' cellpadding='0' cellspacing='0' width='500'>";
    echo "<tbody>";
    echo "<tr>";
     
    	echo "<table style='width: 968px; height: 60px;' border='5' cellpadding='2' cellspacing='1'>"; // Taille du tableau // 
    	echo "<tbody>";
     
    		echo "<tr>";
    				echo "<td class='table-titre' colspan='9'> Ouverture: $ouverture &nbsp&nbsp&nbsp&nbsp Cadence: $cadence &nbsp&nbsp&nbsp&nbsp Taktime: $total </td>";
    		echo "</tr>"; 
     
     
    		echo "<tr>";
    			echo "<td class='table-entete-centre' width='20'>Choix</td>"; 
    			echo "<td class='table-entete-centre' width='20'>Type</td>";
    			echo "<td class='table-entete-centre' width='20'>Début</td>";
    			echo "<td class='table-entete-centre' width='20'>Fin</td>";
    			echo "<td class='table-entete-centre' width='20'>Constat</td>";
    			echo "<td class='table-entete-centre' width='20'>Demande </td>";
    			echo "<td class='table-entete-centre' width='20'>Cause</td>";
    			echo "<td class='table-entete-centre' width='20'>Information</td>";
    			echo "<td class='table-entete-centre' width='20'>Imputation</td>";		
    		echo "</tr>"; 
     
     
    			while (odbc_fetch_row($req)) 
    			{ 
    				$CHOIX = odbc_result($rs,"NUMERO_ARRET_CHAINE");
    				$TYPE=odbc_result($rs,"TYPE");
    				$DEBUT=odbc_result($rs,"HEURE_DEBUT");
    				$FIN=odbc_result($rs,"HEURE_FIN");
    				$CONSTAT=odbc_result($rs,"CONSTAT");
    				$DEMANDE=odbc_result($rs,"DEMANDE");
    				$CAUSE=odbc_result($rs,"CAUSE");
    				$INFO=odbc_result($rs,"COMPLEMENT_INFORMATION");
    				$IMPUTATION=odbc_result($rs,"IMPUTATION");
     
    				echo "<tr>";
    					echo "<td class='table-ligne1-centre' width='100'> <input type=\"radio\" name=\"choix\" value='".$CHOIX."'> </td>";
    					echo "<td class='table-ligne1-centre' width='100'>$TYPE</td>";
    					echo "<td class='table-ligne1-centre' width='100'>$DEBUT</td>";
    					echo "<td class='table-ligne1-centre' width='100'>$FIN</td>"; 
    					echo "<td class='table-ligne1-centre' width='100'>$CONSTAT</td>"; 
    					echo "<td class='table-ligne1-centre' width='100'>$DEMANDE</td>"; 
    					echo "<td class='table-ligne1-centre' width='100'>$CAUSE</td>"; 
    					echo "<td class='table-ligne1-centre' width='100'>$INFO</td>"; 
    					echo "<td class='table-ligne1-centre' width='100'>$IMPUTATION</td>";
    				echo "</tr>"; 
    			}
     
    	echo "</tbody>";
    	echo "</table>"; 
     
    echo "</tr>";  	
    echo "</tbody>";
    echo "</table>"; 
     
    echo "</div>";
     
    //--------------- Tableau des informations générales de la journée ---------------//
     
    echo "<br>";
     
    echo "<table border='0' cellpadding='0' cellspacing='0' width='500'>";
    echo "<tbody>";
     
    	echo "<table style='width: 500px; height: 90px;' border='5' cellpadding='2' cellspacing='1'>";
     
    	    echo "<tr>";
               	echo "<td class='table-titre' colspan='13'> Infos en temps réel </td>";
            echo "</tr>";
     
    //--------------- En tete de colonne ---------------//
     
    			echo "<tr>";
    				echo "<td class='table-entete' width='1'>Nombre d'arrêt </td>";
    				echo "<td class='table-entete' width='1'>Durée perdu </td>";
    				echo "<td class='table-entete-centre' width='20'>Pertes TA </td>";
    				echo "<td class='table-entete-centre' width='20'></td>";
    				echo "<td class='table-entete-centre' width='20'> Trou </td>";
    				echo "<td class='table-entete-centre' width='20'> Autre </td>";							
    				echo "<td class='table-entete-centre' width='20'></td>";
    				echo "<td class='table-entete-centre' width='50'>Durée total perdu </td>";
    				echo "<td class='table-entete-centre' width='50'>TA total perdu </td>";
    			echo "</tr>";	
     
    //--------------- RESULTATS  ---------------//
     
    			echo "<tr>";
    				echo "<td class='table-ligne1-centre' width='100'> $my_array[0] </td>";
    				echo "<td class='table-ligne1-centre' width='100'> $dureeperdu </td>";
    				echo "<td class='table-ligne1-centre' width='100'> $perteTA </td>";
    				echo "<td class='table-ligne1-centre' width='2'></td>";
    				echo "<td class='table-ligne1-centre' width='100'> $resultat </td>";
    				echo "<td class='table-ligne1-centre' width='100'> $dureeinfo </td>";			
    				echo "<td class='table-ligne1-centre' width='2'></td>";
    				echo "<td class='table-ligne1-centre' width='100'> $totalduree </td>";
    				echo "<td class='table-ligne1-centre' width='100'> $pertetotaleTA </td>";			
    			echo "</tr>";
     
    	echo "</tbody>";
     
    echo "</table>";
     
    //--------------- Fermeture de la bdd ---------------//
     
    odbc_close($conn); 
     
    ?>
     
    <!--------------- Fin page utilisateur --------------->
    </form>
    </body> 
     
    </html>

Discussions similaires

  1. [MySQL] problème d'ouverture de popup
    Par Kerrisson dans le forum PHP & Base de données
    Réponses: 1
    Dernier message: 07/05/2007, 09h14
  2. ouverture de popup sur un clic de bouton
    Par zoidberg dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 10/05/2006, 11h24
  3. Problème d'ouverture de popup HTML
    Par Poulain dans le forum ASP.NET
    Réponses: 3
    Dernier message: 27/03/2006, 19h42
  4. ouverture de popup avec parametres
    Par numeror dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 19/12/2005, 08h41
  5. lien aléatoire + ouverture en popup centrée
    Par fred_station dans le forum Général JavaScript
    Réponses: 5
    Dernier message: 13/10/2005, 10h39

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo