Ma fonction est:événement onClick ne
<head>
<script type="text/javascript">
// Info popup window
function showInfo(infFilename) {
alert(infFilename);
popupWin = window.open('notes/"+infFilename+"','open_window','width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=20,top=20');
}
</script>
</head>
Le code php appeler le menu contextuel est:
<?php>
// check if metadata exists (PicNotes is "filename.php")
if ($row['PicNotes']) {
$icon = "<img src = \"images/info.png\" onClick=\"showInfo($row[PicNotes])\" />";
}else{
$icon='';}
echo "<a href='images/".$row['vfile']."' rel='enlargeimage' rev='targetdiv:loadarea' title='<b>".$row['Title']."</b><br />".$row['Medium']." ".$row['iw']." x ".$row['ih']." cm. $icon'><img border='1' src='images/".$row['tnfile']." ' alt=' ' width='".$row['tnx']."' height='".$row['tny']."' class='tn' /></a><br />";
?>
Le code HTML de cette ligne est (de source):
<a href='images/0712120189y.jpg' rel='enlargeimage' rev='targetdiv:loadarea' title='<b>Broken Bridge in Water Meadow</b><br />Gouache & Pastel 24 x 19 cm. <img src = "images/info.png" onClick="showInfo(wm_series.php)" />'><img border='1' src='images/0712120189z.jpg ' alt=' ' width='96' height='75' class='tn' /></a>
S'il vous plaît quelqu'un peut voir ce que je fais mal.
'showInfo ('wm_series.php') 'a besoin de guillemets autour du nom. –
Jetez un oeil au code HTML du ' Barmar