Bonjour,
Je rencontre un problème très bizarre dont je n'ai pas compris la cause.
En fait j'ouvre un popup en passant des variables dans l'URL. Quand je met 2 variables ça passe et la popup s'ouvre mais quand je mes plus ça ne s'ouvre pas.
J'aimerai bien comprendre la source du problème car avant j'ouvrais une simple fenetre avec les mêmes url et ça marchait !
Code Javascript :
<script language="JavaScript">
function fenCentre(url,largeur,hauteur){
var Dessus=(screen.height/2)-(hauteur/2);
var Gauche=(screen.width/2)-(largeur/2);
var features= 'height='+hauteur+',width='+largeur+',top='+Dessus +',left='+Gauche+",scrollbars=yes";
thewin=window.open(url,'',features);
}
</script>
La première popup qui marche
Code PHP :
$varUrl='?externalId='.$externalId.'&dataSource='.$dataSource;
echo '<table width="20%" bgcolor="#E2F2F0" bordercolor="#55A096" border="1">
<tr>
<td width="5%" align="center"><img src="image/new.png" height="20" width="20" align="middle" alt="Nouveau"/></td>
<td width="5%" align="center">
<a href=javascript:fenCentre("enregistrerRechercheBib.php'.$varUrl.'",300,100)>
<img src="image/save.png" height="20" width="20" align="middle" border="0" alt="Enregistrer"/></a></td>
<td width="5%" align="center"><img src="image/import.png"height="20" width="20"align="middle" alt="Importer"/></td>
<td width="5%" align="center"><img src="image/export.png"height="20" width="20" align="middle" alt="Exporter"/></td>
</tr>
</table>';
La deuxième qui ne marche pas
voilà l'url que je passe :
?externalId=641525&dataSource=CIT&title=Creating A Validated Implementation Of The Steam Boiler&abstract=SPIN is a tool for the simulation and verification of protocols.&author=Siegfried Loffler, Ahmed Serhrouchni.
Code PHP :
$varUrl='?externalId='.$externalId.'&dataSource='.$dataSource.'&title='.$title.'&abstract='.$abstract.'&author='.$author;
echo $varUrl;
echo '<table width="20%" bgcolor="#E2F2F0" bordercolor="#55A096" border="1">
<tr>
<td width="5%" align="center"><img src="image/new.png" height="20" width="20" align="middle" alt="Nouveau"/></td>
<td width="5%" align="center">
<a href=javascript:fenCentre("enregistrerRechercheBib.php'.$varUrl.'",300,100)>
<img src="image/save.png" height="20" width="20" align="middle" border="0" alt="Enregistrer"/></a></td>
<td width="5%" align="center"><img src="image/import.png"height="20" width="20"align="middle" alt="Importer"/></td>
<td width="5%" align="center"><img src="image/export.png"height="20" width="20" align="middle" alt="Exporter"/></td>
</tr>
</table>';