..:: MX Studio Fóruns ::..: DIV programada para fechar sozinha. - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

DIV programada para fechar sozinha. Como colocar um link para fechar uma div antes que feche sozinha.

#1 User is offline   CLEIDE 

  • Group: Membros
  • Posts: 180
  • Joined: 15-August 07

Posted 22 April 2010 - 07:58 AM

Olá,

Tenho uma DIV que está programada para fechar em 30 segundos, só que eu gostaria de dar ao internauta a possibilidade de fecha-la antes do tempo.
Como fazer isso?

Abaixo segue o código:

QUOTE
#popup{
position: absolute;
top: 37%;
left: 17%;
width: 500px;
height: 300px;
padding: 20px 20px 20px 20px;
border-width: 0px;
border-style: solid;
background: ;
display: none;
z-index: 50;
visibility: visible;
}
</style>
<script type="text/javascript">
function fechar(){
document.getElementById('popup').style.display = 'none';
}
function abrir(){
document.getElementById('popup').style.display = 'block';
setTimeout ("fechar()", 18000);
}
function MM_showHideLayers() { //v9.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3)
with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
</script>



QUOTE
<body onfocus="java script: abrir()" onclick="MM_showHideLayers('popup','','show')" >
<DIV id="popup">
<p>
<img src="layout_grande/mapa_vazado_fire.gif" /></p>
</DIV>



Com a função "body onload" funciona, mas este comando não permite a aberetura de página com greybox.
0

#2 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2383
  • Joined: 04-November 08

Posted 22 April 2010 - 01:38 PM

insira um pop-up para o user fechar no momento que abrir....
0

#3 User is offline   CLEIDE 

  • Group: Membros
  • Posts: 180
  • Joined: 15-August 07

Posted 22 April 2010 - 06:58 PM

Deculpe, mas como eu faço isso?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)