Probleme window.open
Résolu
aquario
Messages postés
179
Date d'inscription
Statut
Membre
Dernière intervention
-
Switch -
Switch -
Bonjours
Je dois surement faire une erreur quelque part
Dans une page PHP, j'utilise un echo "script"
Pour me fabriquer un pop up
Le pop up est en fait une page type dans laquel viens se mettre
une adresse d'image, image qui s'affiche alors dans ma page type
La variable de l'image s'appele donc $photo
Si je met le script
<A HREF=\"#\" onClick=\"window.open('$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>
J'ai directement mon pop up avec l'image
Si je met
<A HREF=\"#\" onClick=\"window.open('image.php','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>
J'ai un pop up qui va vers la page image.php
J'ai donc tapez comme script a l'interieur de image.php
<?
echo "<center>";
echo "<img src=\"$photo\" border=\"0\">";
echo "</center>";
?>
et utiliser le script suivant pour ouvrir et afficher l'image dans mon pop-up
<A HREF=\"#\" onClick=\"window.open('image.php','$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>
Malheureusement, cela aurait été trop simple, ca ne marche pas,
Quelqu'un à t'il une idee pour afficher l'image dans la page
Merci
MARC
PROBLEME
J'ai bien la page, mais pas moyen d'afficher l'image
Je dois surement faire une erreur de syntaxe
Je dois surement faire une erreur quelque part
Dans une page PHP, j'utilise un echo "script"
Pour me fabriquer un pop up
Le pop up est en fait une page type dans laquel viens se mettre
une adresse d'image, image qui s'affiche alors dans ma page type
La variable de l'image s'appele donc $photo
Si je met le script
<A HREF=\"#\" onClick=\"window.open('$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>
J'ai directement mon pop up avec l'image
Si je met
<A HREF=\"#\" onClick=\"window.open('image.php','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>
J'ai un pop up qui va vers la page image.php
J'ai donc tapez comme script a l'interieur de image.php
<?
echo "<center>";
echo "<img src=\"$photo\" border=\"0\">";
echo "</center>";
?>
et utiliser le script suivant pour ouvrir et afficher l'image dans mon pop-up
<A HREF=\"#\" onClick=\"window.open('image.php','$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>
Malheureusement, cela aurait été trop simple, ca ne marche pas,
Quelqu'un à t'il une idee pour afficher l'image dans la page
Merci
MARC
PROBLEME
J'ai bien la page, mais pas moyen d'afficher l'image
Je dois surement faire une erreur de syntaxe
3 réponses
la variable qui amene a la page est :
echo "<td align=\"center\"width=\"50\">Photo</td><td width=\"100%\"align=\"center\"><A HREF=\"#\"onClick=\"window.open('image.php?cool=$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=$haut, height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A></td>";
Les script de la page de destination est :
<?
echo "<center>";
echo "<img src=\"$cool\"border=\"0\">";
echo "</center>";
?>
Oui
En fait j'ai meme essayer avec autre chose
echo "<td align=\"center\"width=\"50\">Photo</td><td width=\"100%\"align=\"center\"><A HREF=\"#\"onClick=\"window.open('image.php^&^amp^;cool=$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=$haut, height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A></td>";
Mais meme comme ca ca ne fonctionne pas je suis persuadé qu'il y a un probleme avec ce ?
Enfin si tu veux tu peux telecharger mes 2 pages je les ai Zipper
www.lescalaireducentre.com/pages/db/detailphotopois.zip
www.lescalaireducentre.com/pages/db/image.zip
Il y a des endroit ou il y a ^ dans ce post Attention c'est pour afficher le script sinon ca passe sur forum ccm ^=rien et pas= a un espace, je coupe pour que tous apparaisse
echo "<td align=\"center\"width=\"50\">Photo</td><td width=\"100%\"align=\"center\"><A HREF=\"#\"onClick=\"window.open('image.php?cool=$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=$haut, height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A></td>";
Les script de la page de destination est :
<?
echo "<center>";
echo "<img src=\"$cool\"border=\"0\">";
echo "</center>";
?>
Oui
En fait j'ai meme essayer avec autre chose
echo "<td align=\"center\"width=\"50\">Photo</td><td width=\"100%\"align=\"center\"><A HREF=\"#\"onClick=\"window.open('image.php^&^amp^;cool=$photo','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=$haut, height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A></td>";
Mais meme comme ca ca ne fonctionne pas je suis persuadé qu'il y a un probleme avec ce ?
Enfin si tu veux tu peux telecharger mes 2 pages je les ai Zipper
www.lescalaireducentre.com/pages/db/detailphotopois.zip
www.lescalaireducentre.com/pages/db/image.zip
Il y a des endroit ou il y a ^ dans ce post Attention c'est pour afficher le script sinon ca passe sur forum ccm ^=rien et pas= a un espace, je coupe pour que tous apparaisse
Bonjour,
essaye avec:
echo "<A HREF=\"#\" onClick=\"window.open('".$photo."','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>";
Je suis sûr de rien ..
essaye avec:
echo "<A HREF=\"#\" onClick=\"window.open('".$photo."','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=$haut , height=$larg, left=20, top=20');return(false)\"><img src=".$row['photo']." width=\"400\" border=\"0\"></A>";
Je suis sûr de rien ..