<script language="javascript">
function ouvre(cible)
{ window.open(cible, 'Export PDF', 'height=600,width=800,toolbar=0')';
}
</script>
<?php
echo "<div id='onglet'><a href=\"javascript:ouvre('op/exp_mdrPdf.php');\" class='ong'>Export Pdf</a></div><br />";
?>Code : Tout sélectionner
echo "<a href="#" onclick="window.open('op/exp_actuPdf.php','Export PDF','height=600,width=800,toolbar=0')" class="ong">Export Pdf</a></div><br />";
Sans doute.je pense que c'est just un " ou ' qui me fait defaut
$key=$_GET['cls'];
switch ($key)
{ case "actu" : $cible = "op/exp_actuPdf.php"; break;
case "une" : $cible = "op/exp_pdf.php"; break;
case "mdr" : $cible = "op/exp_mdrPdf.php"; break;
case "them" : $cible = "op/exp_themPdf.php"; break;
case "rub" : $cible = "op/exp_rubPdf.php"; break;
default : $cible = "..."; // à compléter
}
echo '<div id="onglet">';
echo '<a href="#" onclick="window.open($cible, \'Export PDF\', \'height=600,width=800,toolbar=0\');" class="ong">Export Pdf</a></div><br />';
echo $key;