Ver Mensaje Individual
  #7 (permalink)  
Antiguo 27/01/2006, 15:35
migueilichenco
 
Fecha de Ingreso: marzo-2004
Mensajes: 186
Antigüedad: 20 años, 1 mes
Puntos: 0
encontre algo

bueno encontre este codigo que es un poco ams sencillo pero es de texto, si alguien supiera como modificarlo para que sea de imagenes se lo agardeceria
el codigo:

Código PHP:
Código Javascript
Globos de ayuda
emergentes o tambien conocidos como tooltipMuy personalizablesfáciles de implantar en su web y elegantes.

Coloque el siguiente código dentro de HEAD ...

<
style type="text/css">
#dhtmltooltip{
positionabsolute;
width150px;
border2px solid black;
padding2px;
background-colorlightyellow;
visibilityhidden;
z-index100;
/*Remove below line to remove shadow. Below line should always appear last within this CSS*/
filterprogid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
}
</
style>

... 
Coloque el resto del codigo dentro de BODY ...

<
div id="dhtmltooltip"></div>
<
script type="text/javascript">
var 
offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var 
tipobj=document.alldocument.all["dhtmltooltip"] : document.getElementByIddocument.getElementById("dhtmltooltip") : ""

function ietruebody(){
return (
document.compatMode && document.compatMode!="BackCompat")? document.documentElement document.body
}

function 
ddrivetip(thetextthecolorthewidth){
if (
ns6||ie){
if (
typeof thewidth!="undefined"tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!=""tipobj.style.backgroundColor=thecolor
tipobj
.innerHTML=thetext
enabletip
=true
return false
}
}

function 
positiontip(e){
if (
enabletip){
var 
curX=(ns6)?e.pageX event.x+ietruebody().scrollLeft;
var 
curY=(ns6)?e.pageY event.y+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.operaietruebody().clientWidth-event.clientX-offsetxpoint window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.operaietruebody().clientHeight-event.clientY-offsetypoint window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ieietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ieietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}

function 
hideddrivetip(){
if (
ns6||ie){
enabletip=false
tipobj
.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
document.onmousemove=positiontip
</script>

... Ahora por último donde quiera un vínculo con un tooltip o globo emergente deberá utilizar la función 

ddrivetip('Texto a mostrar', 'Opcional color fondo', Opcional ancho del emergente)

Ejemplos:

<a href="http://www.hola.com" onMouseover="ddrivetip('Visita hola.com')";
onMouseout="hideddrivetip()">hola<br><img src="logo.gif" border=0></a>

<a href="http://www.hola.com" onMouseover="ddrivetip('Yahoo\'s Site', 'yellow', 250)";
onMouseout="hideddrivetip()">hola<br><img src="logo.gif" border=0></a>

<DIV onMouseover="ddrivetip('Esto es una capa', '#EFEFEF')";
onMouseout="hideddrivetip()">Ponga aqui su codigo de la capa. Ponga aqui su texto..... aqui su texto.... tecnocodigo.com</div>


... Notese como en todos los ejemplos se incluye tambien el hideddrivetip() para ocultar el tip una vez el raton no esté sobre el elemento. 
gracias de antemano
__________________
Software a Medida
voip Locutorios