Foros del Web » Programando para Internet » Javascript »

introducir var persistclose

Estas en el tema de introducir var persistclose en el foro de Javascript en Foros del Web. hola, estoy intentando introducir una varible tipo cookie para que solo se ejecute la primera vez al entrar en la web ,pero no me aclaro ...
  #1 (permalink)  
Antiguo 13/01/2009, 16:19
 
Fecha de Ingreso: enero-2009
Mensajes: 1
Antigüedad: 15 años, 4 meses
Puntos: 0
introducir var persistclose

hola, estoy intentando introducir una varible tipo cookie para que solo se ejecute la primera vez al entrar en la web ,pero no me aclaro !!
me podria echar alguien una cable ??

el script es este :

<head>
<script type="text/javascript">
function esconde_anuncio(divId)
{ if (document.layers) document.layers[divId].visibility = 'hide';
else if (document.all) document.all[divId].style.visibility = 'hidden';
else if (document.getElementById) document.getElementById(divId).style.visibility = 'hidden';
}
function mostrar_anuncio(divId)
{ state=typeof topPos;
if(state=='undefined') topPos=-260;
if(topPos < 75)
{ topPos+=3;
if (document.layers) document.layers[divId].top = topPos;
else if (document.all) document.all[divId].style.top = topPos;
else if (document.getElementById) document.getElementById(divId).style.top = topPos;

setTimeout("mostrar_anuncio('pop');",25);
}
}
</script>
</head>
<BODY onload="mostrar_anuncio('pop')">
<script type="text/javascript">
if (parseInt(navigator.appVersion) >= 4 && navigator.javaEnabled())
{ document.write('<div id="pop" style="position:absolute;top:-260;">');
document.write('<table cellpadding="0" cellspacing="2" bgcolor="#7FA3C7" border="0"><tr><td><table cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" border="0">');
document.write('<tr><td align="right" height="24"><a href="javascript:void(0)" onclick="esconde_anuncio(\'pop\')"><img src="/tutores/images/x.gif" border="0" alt="Cerrar Ventana"></a></td></tr>');
document.write('<tr><td align="center"><font size="5"><b><i>Puedes introducir textos, imagenes, flash y enlaces\'</b></font><br><br><img src="/tutores/images/profe.gif"><br><br><b><a href="#">Textos con enlaces!</a></b><br><br></td></tr>');
document.write('</table></td></tr></table>');
document.write('</div>');
if (document.layers) document.layers.pop.left = ((window.innerWidth / 2) - (330 / 2));
else if (document.all) document.all.pop.style.left = ((document.body.offsetWidth / 2) - (330 / 2));
else if (document.getElementById) document.getElementById("pop").style.left = ((window.innerWidth / 2) - (330 / 2));
}
</script>
</body>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:15.