Encore la PopUp
alexislevrai
Messages postés
603
Statut
Membre
-
alexislevrai Messages postés 603 Statut Membre -
alexislevrai Messages postés 603 Statut Membre -
Bonsoir,
j'ai mis en place un cookies pour que ma pop-up ne s'ouvre que la premiere fois, mais je n'arrive pas a intégrer ma popup. J'ai présenté cela comme ca:
seulement lorsque le cookies n'est pas détecté ça m' affiche ceci indow.open(\'popup.html\', \'popup\', config=\'height=350, width=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no\' et ne m'ouvre donc pas la fenêtre popup.
D'ou vient le problème ?
j'ai mis en place un cookies pour que ma pop-up ne s'ouvre que la premiere fois, mais je n'arrive pas a intégrer ma popup. J'ai présenté cela comme ca:
<?php
// génère le cookie
$contenu = 'LEON'; // le contenu de votre cookie
setcookie("popup", $contenu, time()+30);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Must Have Online</title>
<meta http-equiv="refresh" content="0;url= store.html" />
</head>
<body>
<?php
// test l'existance d'un cookie apelé "popup"
if (isset($_COOKIE["popup"]))
echo 'ExistePas';
else {
echo 'window.open(\'popup.html\', \'popup\', config=\'height=350, width=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no\')'."\n";
}
?>
</body>
</html>
seulement lorsque le cookies n'est pas détecté ça m' affiche ceci indow.open(\'popup.html\', \'popup\', config=\'height=350, width=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no\' et ne m'ouvre donc pas la fenêtre popup.
D'ou vient le problème ?
A voir également:
- Encore la PopUp
- Fake mcafee popup - Accueil - Piratage
- Firefox autoriser popup - Guide
- Real popup - Télécharger - Divers Réseau & Wi-Fi
- Popup cookies - Guide
- Bbs popup menu ✓ - Forum Windows
26 réponses
Euh, je crois que je t'ai dit des bêtises tout à l'heure. Désolé. La redirection merde dans ton cas parce que la page s'appelle elle même donc ca fait un boucle de redirection.
Donc alors :
Ensuite, tu met :
Comme ça, l'action vers le js ce feras uniquement si le cookie existe.
En tout cas +1 pour DJ Mehdi et sa Ed Banger Crew !!!
Donc alors :
if (!isset($_COOKIE["popup"])) // Met le reste du code hors de ca, juste après
{
$option_lien = 'onclick="ouvrir(this.href)"';
}
else
{
$option_lien = ' ';
}
Ensuite, tu met :
<area href="https://musthaveonline.bigcartel.com/" title="https://musthaveonline.bigcartel.com/" alt="https://musthaveonline.bigcartel.com/" <?php echo $option_lien; ?> onmouseout="IMmouseout('shapeimage_1', '1');" shape="rect" onmouseover="IMmouseover('shapeimage_1', '1');" coords="100, 9, 138, 35" />
Comme ça, l'action vers le js ce feras uniquement si le cookie existe.
En tout cas +1 pour DJ Mehdi et sa Ed Banger Crew !!!
Je vais bouffer l'ordi !!
ca ne veux pas !
ca ne veux pas !
<?php
// génère le cookie
$contenu = 'LEON'; // le contenu de votre cookie
setcookie("popup", $contenu, time()+120);
if (!isset($_COOKIE["popup"])) // Met le reste du code hors de ca, juste après
{
$option_lien = 'onclick="ouvrir(this.href)"';
}
else
{
$option_lien = ' ';
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="iWeb 2.0.4" />
<meta name="iWeb-Build" content="local-build-20081229" />
<meta name="viewport" content="width=900" />
<title>Must Have Online - Home</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="home_files/home.css" />
<!--[if IE]><link rel='stylesheet' type='text/css' media='screen,print' href='home_files/homeIE.css'/><![endif]--><style type="text/css">
/*<![CDATA[*/
@import "Scripts/Widgets/HTMLRegion/Paste.css";
/*]]>*/
</style>
<script type="text/javascript" src="Scripts/iWebSite.js"></script>
<script type="text/javascript" src="Scripts/Widgets/SharedResources/WidgetCommon.js"></script>
<script type="text/javascript" src="Scripts/Widgets/HTMLRegion/Paste.js"></script>
<script type="text/javascript" src="Scripts/iWebImage.js"></script>
<script type="text/javascript" src="home_files/home.js"></script>
<script type="text/javascript">
function ouvrir()
{
window.open('popup.html', 'popup', 'height=310, width=500, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no'); // On affiche le popup
window.location.href="https://musthaveonline.bigcartel.com/"; // On renvoi la page
}
</script>
</head>
<body style="background: #000000; margin: 0pt; " onload="onPageLoad();" onunload="onPageUnload();">
<div style="text-align: center; ">
<div style="margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; overflow: hidden; position: relative; word-wrap: break-word; text-align: left; width: 900px; " id="body_content">
<div style="background: transparent url(home_files/backgroundimage_1.png) no-repeat scroll center center; width: 900px; ">
<div style="float: left; margin-left: 0px; position: relative; width: 900px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"> </div>
</div>
<div style="height: 28px; margin-left: 0px; position: relative; width: 900px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id1" style="height: 15px; left: 15px; position: absolute; top: 0px; width: 37px; z-index: 1; " class="style_SkipStroke">
<div class="text-content style_External_37_15" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style">Must Have Online - Home</p>
</div>
</div>
</div>
<div class="com-apple-iweb-widget-HTMLRegion" id="widget0" style="height: 24px; left: 752px; position: absolute; top: 4px; width: 200px; z-index: 1; ">
<iframe id="widget0-frame" src=".//home_files/widget0_markup.html" frameborder="0" style="width: 100%; height: 100%;" scrolling="no" marginheight="0" marginwidth="0" allowTransparency="true"></iframe>
</div>
<script type="text/javascript"><!--//--><![CDATAPaste('widget0', 'Scripts/Widgets/HTMLRegion', 'Scripts/Widgets/SharedResources', '.', {});
//--><!]></script>
</div>
<div style="margin-left: 0px; position: relative; width: 900px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div class="tinyText" style="height: 35px; left: 310px; position: absolute; top: 165px; width: 559px; z-index: 1; ">
<img usemap="#map1" id="shapeimage_1" src="home_files/shapeimage_1.png" style="border: none; height: 44px; left: -5px; position: absolute; top: -5px; width: 569px; z-index: 1; " alt="newsletter - store - contact - archives - recrutement - votre coté must have " title="" /><map name="map1" id="map1"><area href="http://www.musthaveonline.fr/administration/newsletter/subscribe.php" title="http://www.musthaveonline.fr/administration/newsletter/subscribe.php" alt="http://www.musthaveonline.fr/administration/newsletter/subscribe.php" onmouseout="IMmouseout('shapeimage_1', '0');" shape="rect" onmouseover="IMmouseover('shapeimage_1', '0');" coords="9, 9, 82, 35" onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;" />
<area href="https://musthaveonline.bigcartel.com/" title="https://musthaveonline.bigcartel.com/" alt="https://musthaveonline.bigcartel.com/" <?php echo $option_lien; ?> onmouseout="IMmouseout('shapeimage_1', '1');" shape="rect" onmouseover="IMmouseover('shapeimage_1', '1');" coords="100, 9, 138, 35" /><area href="contact.html" title="contact.html" alt="contact.html" onmouseout="IMmouseout('shapeimage_1', '2');" shape="rect" onmouseover="IMmouseover('shapeimage_1', '2');" coords="157, 9, 211, 35" /><area href="archives.html" title="archives.html" alt="archives.html" onmouseout="IMmouseout('shapeimage_1', '3');" shape="rect" onmouseover="IMmouseover('shapeimage_1', '3');" coords="230, 9, 286, 35" /><area href="recrutement.php" title="recrutement.php" alt="recrutement.php" onmouseout="IMmouseout('shapeimage_1', '4');" shape="rect" onmouseover="IMmouseover('shapeimage_1', '4');" coords="305, 9, 389, 35" /><area href="votrecote.php" title="votrecote.php" alt="votrecote.php" onmouseout="IMmouseout('shapeimage_1', '5');" shape="rect" onmouseover="IMmouseover('shapeimage_1', '5');" coords="408, 9, 555, 35" /></map><img style="height: 26px; left: 4px; position: absolute; top: 4px; width: 73px; " alt="shapeimage_1_link_0" src="home_files/shapeimage_1_link_0.png" id="shapeimage_1_link_0" /><img style="height: 26px; left: 95px; position: absolute; top: 4px; width: 38px; " alt="shapeimage_1_link_1" src="home_files/shapeimage_1_link_1.png" id="shapeimage_1_link_1" /><img style="height: 26px; left: 152px; position: absolute; top: 4px; width: 54px; " alt="shapeimage_1_link_2" src="home_files/shapeimage_1_link_2.png" id="shapeimage_1_link_2" /><img style="height: 26px; left: 225px; position: absolute; top: 4px; width: 56px; " alt="shapeimage_1_link_3" src="home_files/shapeimage_1_link_3.png" id="shapeimage_1_link_3" /><img style="height: 26px; left: 300px; position: absolute; top: 4px; width: 84px; " alt="shapeimage_1_link_4" src="home_files/shapeimage_1_link_4.png" id="shapeimage_1_link_4" /><img style="height: 26px; left: 403px; position: absolute; top: 4px; width: 147px; " alt="shapeimage_1_link_5" src="home_files/shapeimage_1_link_5.png" id="shapeimage_1_link_5" />
</div>
<div class="tinyText" style="height: 28px; left: 776px; position: absolute; top: 905px; width: 81px; z-index: 1; ">
<img usemap="#map2" id="shapeimage_2" src="home_files/shapeimage_2.png" style="border: none; height: 38px; left: -4px; position: absolute; top: -4px; width: 89px; z-index: 1; " alt="archives >>" title="" /><map name="map2" id="map2"><area href="archives.html" title="archives.html" alt="archives.html" onmouseout="IMmouseout('shapeimage_2', '0');" shape="rect" onmouseover="IMmouseover('shapeimage_2', '0');" coords="8, 8, 79, 30" /></map><img style="height: 22px; left: 4px; position: absolute; top: 4px; width: 71px; " alt="shapeimage_2_link_0" src="home_files/shapeimage_2_link_0.png" id="shapeimage_2_link_0" />
</div>
<div style="height: 247px; width: 281px; height: 247px; left: 64px; position: absolute; top: -18px; width: 281px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 281px; ">
<img src="home_files/shapeimage_3.png" alt="" style="height: 215px; left: 0px; margin-left: 2px; margin-top: 16px; position: absolute; top: 0px; width: 276px; " />
</div>
</div>
<div class="tinyText" style="height: 28px; left: 67px; position: absolute; top: 905px; width: 328px; z-index: 1; ">
<img usemap="#map3" id="shapeimage_4" src="home_files/shapeimage_4.png" style="border: none; height: 38px; left: -4px; position: absolute; top: -4px; width: 336px; z-index: 1; " alt="2008 , Must Have tous droits réservés. Contact." title="" /><map name="map3" id="map3"><area href="contact.html" title="contact.html" alt="contact.html" onmouseout="IMmouseout('shapeimage_4', '0');" shape="rect" onmouseover="IMmouseover('shapeimage_4', '0');" coords="248, 8, 295, 30" /></map><img style="height: 22px; left: 244px; position: absolute; top: 4px; width: 47px; " alt="shapeimage_4_link_0" src="home_files/shapeimage_4_link_0.png" id="shapeimage_4_link_0" />
</div>
<!-- VIGNETTE 1 left:104 top: 253 -->
<div style="height: 300px; width: 220px; height: 300px; left: 104px; position: absolute; top: 253px; width: 220px; z-index: 1; " class="tinyText style_SkipStroke_1 stroke_0">
<a href="photos/subway"><img src="home_files/djmedhi1.png" alt="" style="border: none; height: 300px; width: 221px; " /></a>
</div>
<!-- VIGNETTE 2 left:343 top: 258 -->
<div style="height: 314px; width: 287px; height: 314px; left: 343px; position: absolute; top: 258px; width: 287px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 287px; ">
<a href="photos/subway"><img src="home_files/djmedhi2.png" alt="" style="height: 297px; left: 0px; margin-left: 2px; margin-top: 9px; position: absolute; top: 0px; width: 282px; " /></a>
</div>
</div>
<!-- VIGNETTE 3 left:641 top: 246 -->
<div style="height: 315px; width: 241px; height: 314px; left: 641px; position: absolute; top: 246px; width: 240px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 240px; ">
<a href="photos/subway" ><img src="home_files/djmedhi3.png" alt="" style="height: 305px; left: 0px; margin-left: -1px; margin-top: 10px; position: absolute; top: 0px; width: 240px; " /></a>
</div>
</div>
<!-- VIGNETTE 4 left:70 top: 547 -->
<div style="height: 314px; width: 287px; height: 314px; left: 70px; position: absolute; top: 547px; width: 287px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 287px; ">
<a href="photos/subway"><img src="home_files/djmedhi4.png" alt="" style="height: 297px; left: 0px; margin-left: 2px; margin-top: 9px; position: absolute; top: 0px; width: 282px; " /></a>
</div>
</div>
<!-- VIGNETTE 5 left:347 top: 556 -->
<div style="height: 322px; width: 296px; height: 322px; left: 347px; position: absolute; top: 556px; width: 296px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 296px; ">
<a href="photos/subway" ><img src="home_files/djmedhi5.png" alt="" style="height: 306px; left: 0px; margin-left: 21px; margin-top: 8px; position: absolute; top: 0px; width: 255px; " /></a>
</div>
</div>
<!-- VIGNETTE 6 left:651 top: 554 -->
<div style="height: 300px; width: 220px; height: 300px; left: 651px; position: absolute; top: 554px; width: 220px; z-index: 1; " class="tinyText style_SkipStroke_1 stroke_0">
<a href="photos/subway" ><img src="home_files/djmedhi6.png" alt="" style="border: none; height: 300px; width: 221px; " /></a>
</div>
<div style="height: 933px; line-height: 933px; " class="spacer"> </div>
</div>
<div style="height: 30px; margin-left: 0px; position: relative; width: 900px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
</div>
</div>
</div>
</div>
</body>
</html>
Alors comment te faire comprendre que tu est génial !
Merci merci beaucoup de m'avoir accordé tout ce temps, si tu aime Medhi, n'hésite pas a t'inscrire a la newsletter du site, www.musthaveonline.fr on ouvre bientôt avec des interviews, des exclus, shootings d'artistes donc ca peut peut etre t'intéresser.
Sinon merci, si jamais tu a besoin de quoi que ce soit niveau design/graphisme, n'hésite pas, www.alfadesign.fr , ce sera avec grand plaisir.
Merci.
Merci merci beaucoup de m'avoir accordé tout ce temps, si tu aime Medhi, n'hésite pas a t'inscrire a la newsletter du site, www.musthaveonline.fr on ouvre bientôt avec des interviews, des exclus, shootings d'artistes donc ca peut peut etre t'intéresser.
Sinon merci, si jamais tu a besoin de quoi que ce soit niveau design/graphisme, n'hésite pas, www.alfadesign.fr , ce sera avec grand plaisir.
Merci.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question