Jump to content
Fórum Script Brasil

Ajuda Floater


jpm23
 Share

Recommended Posts

Boa amigos, meu primeiro post e um pedido de ajuda:

Eu tenho um código de um floater e gostaria do seguinte:

Inserir nele um código que quando o visitante clicar ele some e so volta a aparecer para este visitante umas 12 horas depois, ou seja se o cara clica ele é redirecionado o floater fecha e não apere mais por um periodo de 12 horas, se não clica a cada pagina navegada ele aparece.

O codigo que tenho é este:

<STYLE>
A.link:link {color: black; text-decoration: none}
A.link:visited {color: black; text-decoration: none}
A.link:active {color: black; text-decoration: none} 
A.link:hover {color: black; text-decoration : none;}
<STYLE>
A.link:link {color: black; text-decoration: none}
A.link:visited {color: black; text-decoration: none}
A.link:active {color: black; text-decoration: none} 
A.link:hover {color: black; text-decoration : none;}
</STYLE>
<script language="JavaScript1.2">
var ie=document.all
var dom=document.getElementById
var ns4=document.layers

var bouncelimit=32 //(must be divisible by 8)
var direction="up"

function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById
("dropin").style : ie? document.all.dropin : 
document.dropin
scroll_top=(ie)? document.body.scrollTop : 
window.pageYOffset
crossobj.top=scroll_top-280
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}
function dropin(){
scroll_top=(ie)? document.body.scrollTop : 
window.pageYOffset
if (parseInt(crossobj.top)<250+scroll_top)
crossobj.top=parseInt(crossobj.top)+25
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}
function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}
function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring
(offset, end))
}
}
return returnvalue;
}
function dropornot(){
if (get_cookie("droppedin")==""){
window.onload=initbox
document.cookie="droppedin=yes"
}
}
dropornot()
function redo(){
bouncelimit=32
direction="up"
initbox()
}
window.onload=initbox
</script>
</HEAD>
<BODY>
<div id="dropin" 
style="position:absolute;visibility:hidden;left:321px;top:28px;w
idth:500;height:263px;background-color:#F5F5F5; width:360px">
<TABLE WIDTH="100%" HEIGHT="100%" BORDER="1" 
CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#000000">
<TR>
<TD valign="top" bgcolor="#100084" align="center"><div align="right">
 <p style="margin-top: 1px; margin-bottom: 1px">
 <b><FONT FACE="Verdana" 
SIZE="1">
 <a class="link" 
href="java script:dismissbox()"><font color="#FFFFFF">| <span lang="pt-br">Fechar</span> 
    |</font></a></FONT><font color="#FFFFFF"><a target="_blank" href="LINK"><img border="0" src="IMAGEM" width="359" height="280" align="left"></a></font></b></div>
</TD> </TR>
</TABLE>
</div>

obrigado desde já.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      151k
    • Total Posts
      649.1k
×
×
  • Create New...