Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom dia, estou tentando fazer com que um banner poupup abra apenas uma vez na pagina mas nao estou conseguindo, estou om problemas pra encontrar a solução, se alguem puder me explicar como eu faço isso funcionar, por favor,
<?php
session_start();
if(isset($variavel['Submit2'])){
$_SESSION['bannerpoupup'] = 'podeabrir';
}
?>
<!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" />
<title>Untitled Document</title>
<style type="text/css">
.popup{font-family: Arial, Helvetica, sans-serif; font-size: 20px; color: #F00; background-color: #FC6; width:300px; height:250px; padding:10px;
border:2px solid #F00;}
</style>
</head>
<body>
<!--poupup om desabilitação-->
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<?php
if(isset($_SESSION['bannerpoupup']) and $_SESSION['bannerpoupup']<> ""){
echo"ja foi fechado";
}else{
?>
<div id="ultimas" style="z-index: 4; left: 96px; visibility: visible; width: 367; position: absolute; top: 68px; height: 323; layer-background-image: url('http://www.forumweb.com.br/img/traspa.gif'); border: 1px none #000000; background-image: url('http://www.forumweb.com.br/img/traspa.gif')">
<table cellSpacing="5" cellPadding="0" width="100%" border="0">
<tr>
<td>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="100%"><div class="popup"> Em breve nossa empresa estará com <strong>Filial em São Paulo</strong>, sendo que desta forma os <strong>Preços serão ainda Melhores</strong>, o Frete será muito <strong>mais Barato</strong> e você Receberá o seu pedido Muito <strong>mais Rápido!</strong> <br />
<br />
Att
Equipe Shekinah <br />
</div></td>
</tr>
</table>
<div align="center">
<b>
<input onclick="MM_showHideLayers('ultimas','','hide')" type="image" src="btnFechar.jpg" value="Fechar" name="Submit2">
</b>
</div>
</td>
</tr>
</table>
</div>
<?php } ?>
<!--Fim poupup om desabilitação-->
<?php include_once("loja/index.php"); ?>
</body>
</html>Carregando comentários...