Jump to content


Photo

Mensagem Sobre Link No Menu


  • Faça o login para participar
4 replies to this topic

#1 rusber

rusber

    Turista

  • Usuários
  • 30 posts
  • Sexo:Não informado

Posted 09/02/2006, 14:46

Olá pessoal,

Depois de efetuar uma busca pelo sitema, resolvi postar esta minha dúvida.

Estou precisando que em determinado link do menu, assim que passe o mouse sobre ele, antes de ir ao link, apareça sobre o link uma informação.

Já tentei o comando "title" mas ele é muito lento e em se tratando de link, quando a mensagem aparecer o usuário já estará em outra página.

Estou colocando esta figura como exemplo:

1 - o link do menu
2 - o link quando o mouse está sobre ele

#2 Crab

Crab

    Da paz, mas preparado para Guerra

  • Ex-Admins
  • 2521 posts
  • Sexo:Masculino
  • Localidade:Florianópolis - SC
  • Interesses:Desenvolvimento Gráfico e Web.

Posted 09/02/2006, 15:12

Não consegui ver a figura mas acho que com CSS vc resolve isso mais fácil do que com layer ...

Mas uma boa opção de pesqueisa seria nos sites:

http://www.maujor.com.br

http://www.dynamicdrive.com


Vários exemplos e explicações ...

(y)Até mais

#3 rusber

rusber

    Turista

  • Usuários
  • 30 posts
  • Sexo:Não informado

Posted 09/02/2006, 15:17

Olá Crab,

Este link www.maujor.com.br não funcionou aqui.

Vou fazer uma pesquisa no segundo.

Enquanto isso, a imagem (vou tentar postar novamente):

Attached Files



#4 Andreia Regina

Andreia Regina

    Veterano

  • Conselheiros
  • 1347 posts
  • Sexo:Feminino
  • Localidade:PR
  • Interesses:PHP; MySQL; Javascript; CSS; tudo ligado ao desenvolvimento web.

Posted 09/02/2006, 15:26

Oi!

www.maujor.com

Fórum WMO - Conselheira - Na equipe desde 31/01/2006.
Links importantes: Regras de conduta - Busca do fórum


#5 rusber

rusber

    Turista

  • Usuários
  • 30 posts
  • Sexo:Não informado

Posted 09/02/2006, 20:07

Olá pessoal,

A quem interessar, consegui encontrar uma alternativa para o que quero. Como sempre, não sei se é a mais viável, mas, no momento é o que eu tenho.

Abaixo passo o código.

o style
<style type="text/css">
<!--

.tooltiptitle{COLOR: #000000; TEXT-DECORATION: none; CURSOR: Default; font-family: arial; font-weight: bold; font-size: 10pt}
.tooltipcontent{COLOR: #000000; TEXT-DECORATION: none; CURSOR: Default; font-family: arial; font-size: 10pt}

#ToolTip{position:absolute; width: 100px; top: 0px; left: 0px; z-index:4; visibility:hidden;}

-->
</style>

o script
<script language = "javascript">
<!--

var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0

if(ns){doc = "document."; sty = ""}
if(ie){doc = "document.all."; sty = ".style"}

var initialize = 0
var Ex, Ey, topColor, subColor, ContentInfo

if(ie){
Ex = "event.x"
Ey = "event.y"

topColor = "#FCFCFC"
subColor = "#FCFCFC"
}

if(ns){
Ex = "e.pageX"
Ey = "e.pageY"
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=overhere

topColor = "#FCFCFC"
subColor = "#FCFCFC"
}

function MoveToolTip(layerName, FromTop, FromLeft, e){
if(ie){eval(doc + layerName + sty + ".top = "  + (eval(FromTop) + document.body.scrollTop))}
if(ns){eval(doc + layerName + sty + ".top = "  +  eval(FromTop))}
eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 15))
}

function ReplaceContent(layerName){

if(ie){document.all[layerName].innerHTML = ContentInfo}

if(ns){

with(document.layers[layerName].document) 
{ 
   open(); 
   write(ContentInfo); 
   close(); 
}

}

}

function Activate(){initialize=1}
function deActivate(){initialize=0}

function overhere(e){
if(initialize){

MoveToolTip("ToolTip", Ey, Ex, e)
eval(doc + "ToolTip" + sty + ".visibility = 'visible'")
}

else{
MoveToolTip("ToolTip", 0, 0)
eval(doc + "ToolTip" + sty + ".visibility = 'hidden'")
}
}
function EnterContent(layerName, TTitle){

ContentInfo = '<table border="0" width="110" cellspacing="0" cellpadding="0">'+
'<tr><td width="100%" bgcolor="#000000">'+

'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
'<tr><td width="100%" bgcolor='+topColor+'>'+

'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+
'<tr><td width="100%">'+

'<font class="tooltiptitle">&nbsp;'+TTitle+'</font>'+

'</td></tr>'+
'</table>'+

'</td></tr>'+

'<tr><td width="100%" bgcolor='+subColor+'>'+

'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+

'<tr><td width="100%">'+

'</td></tr>'+
'</table>'+

'</td></tr>'+
'</table>'+

'</td></tr>'+
'</table>';

ReplaceContent(layerName)
}
//-->
</script>

no body
<body onmousemove="overhere()">

imediatamente abaixo do body
<div id="ToolTip"></div>

no link
<a href="endereco_aqui.htm" onMouseover="EnterContent('ToolTip','in portuguese'); Activate();" onMouseout="deActivate()">text</a><br>

Abraços




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq