Bom gente,
Tenho esse banner flutuante em cima do site que é uma imagem estatica e nele tem um botão "Fechar"
Tá acontecendo de clicar em "Fechar" e o banner ser jogado pro canto da tela e não fechar, só consegue fechar quando clica pela segunda vez.
alguém pode me dá uma luz.
segue o codigo:
<style type="text/css">
div#geral {
width: 770px;
margin: 0 auto;
text-align: left;
}
</style>
<div id="geral">
<body>
<div id="showimage" style="position: absolute; width: 323; left: 220; top: 80; height: 176">
<table border="0" bgcolor="#FFFFFF" cellpadding="20" cellspacing="0">
<tr>
<td onMousedown="initializedragie()" style="cursor:hand">
<ilayer onSelectStart="return false">
<layer onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0">
<div style=position:absolute;left:280px;top:3px;><a href="" onClick="hidebox();return false" style=text-decoration:none; title=Janela><font color=blue face=verdana size=2 align=left><b> FECHAR</b></a></div>
<img src="images/bannerflutua.jpg" alt="hc" border="0" width="378" height="223" title="hicompras">
</layer>
</ilayer>
</td>
</tr>
</table>
</div>
</body>
</div>
<script language="javascript">
var dragswitch=0
var nsx
var nsy
var nstemp
var dragapproved=false
function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event .clientX-iex
document.all.showimage.style.pixelTop=tempy+event. clientY-iey
return false
}
}
function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event .clientX-iex
document.all.showimage.style.pixelTop=tempy+event. clientY-iey
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function initializedragie(){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}
if (document.all){
document.onmouseup=new Function("dragapproved=false")
}
function hidebox(){
if (document.all)
showimage.style.visibility="hidden"
else if (document.layers)
document.showimage.visibility="hide"
}
</script>
agradeço qualquer ajuda. obrigado.
1 resposta neste tópico
#2
Postado 29 November 2008 - 02:00 AM
Po cara...
Aqui no IE7 funcionou!
Aqui no IE7 funcionou!
Tópicos Relacionados
| Tópico | Fórum | Criado por | Estatísticas | Última Postagem | |
|---|---|---|---|---|---|
Problemas para acessar o Gateway, por favor, ajudem! |
Redes | Finde |
|
|
|
Script de Startup, funciona em apenas algumas maquinas. |
Windows Server 2008/R2 | thegroser |
|
|
|
GPO não esta funcionando ! |
Windows Server 2008/R2 | wpirre |
|
|
|
Montando novo PC, vga por até 600 e gargalo |
Placas de Vídeo e Monitores | Zard32 |
|
|
|
Excell 2010 - Tempo de casa dos colaboradores por porcentagem |
Microsoft Office | FABIKINHO |
|
|

Papel de Parede
Entrar
Cadastre-se
Ajuda
RSS
Ir para o topo













