Récupérer valeur sur clique impossible
Bonjour,
Je suis sur la fin d'une création de galerie video et je m'arrache les cheveux sur une partie toute bête je suis sur.
En gros je crée un <table> sur chaque ligne trouvé dans ma base. Ce <table> comprend une image miniature cliquable, une description, une date etc.
Quand l'utilisateur clique sur une image une popup jquery et affiche un lecteur pour lire la video qui correspond a ce clique. Sauf que je n'arrive pas a récupérer la valeur de ce clique :cry::cry::cry:
Un peu de code pour comprendre un peu le tout (franchement il est simple a mon grand étonnement) :
Code:
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
|
<?php
$reqTitre = "SELECT titre, id_titre FROM galerie_titre WHERE titre <> 'Nouveau' ORDER BY position_titre ASC";
$executeReqTitre = mysql_query($reqTitre);
if ($executeReqTitre) {
while ($Row_titre = mysql_fetch_assoc($executeReqTitre)) {
$titre = $Row_titre['titre'];
$idTitre = $Row_titre['id_titre'];
//echo '<br />' .$idTitre. '<br />'; ?>
<br /><br />
<div class="titre_Galerie">
<?php echo $Row_titre['titre']; ?>
<br />
</div>
<?php
$reqVideoTitre =
"SELECT id, nom_video, description, date_video, lien_image, lien_video, visible_video, position_video, id_galerie_titre
FROM galerie_videos
WHERE visible_video = 1 AND id_galerie_titre = '$idTitre' ORDER BY position_video ASC;";
$executeReqVideoTitre = mysql_query($reqVideoTitre);
if ($executeReqVideoTitre) { ?>
<div class="divTab" id="nav" >
<?php while ($Row_Video = mysql_fetch_assoc($executeReqVideoTitre)) { ?>
<table border="1" style="float:left;">
<tr>
<td><a href="#" class="btn" name="nbtn" id="<?php echo $Row_Video['id'] ?>">
<img style="width:190px;" src="<?php echo $Row_Video['lien_image']; ?>" border="0" id="<?php $Row_Video['id']; ?>" />
</a>
</td>
</tr>
<tr>
<td> <?php echo $Row_Video['nom_video']; ?> </td>
</tr>
<tr>
<td> <?php echo $Row_Video['date_video']; ?> </td>
</tr>
<tr>
<td> <?php echo $Row_Video['description']; ?> </td>
</tr>
</table>
<div>
<input name="idVideo" class="recup" type="hidden" value="<?php echo $Row_Video['id'] ?>" />
</div>
<?php } ?>
</div>
<?php }
}
}
?>
<?php
$wIdVideo = CEST ICI QUE JE VEUX RÉCUPERER LE ID DE MON CLIQUE
$reqVideo = "SELECT id, nom_video, description, date_video, lien_image, lien_video, visible_video, position_video, id_galerie_titre
FROM galerie_videos
WHERE id='$wIdVideo'";
$executeReqVideo = mysql_query($reqVideo);
if ($executeReqVideo) { ?>
<div class="popup">
<?php while ($Row_La_Video = mysql_fetch_assoc($executeReqVideo)) { ?>
<a class="closeP" href="#">X</a>
<a id="<?php echo $Row_La_Video['id']; ?>" href="<?php echo $Row_La_Video['lien_video']; ?>">
<img alt="Cliquez pour visionner le film" src="<?php echo $Row_La_Video['lien_image']; ?>" />
</a>
<script language="JavaScript">
flowplayer(<?php echo $Row_La_Video['id']; ?>, "flowplayer/flowplayer-3.2.7.swf");
</script>
<?php } ?>
</div>
<?php
}
?> |
Si quelqu'un peu me venir en aide ca serait super cool :ccool: