...

View Full Version : Mouse over - photo preview



carbon
08-31-2006, 09:31 PM
Hi all!

I relly need a script like it's at http://www.templatemonster.com (template preview). I need to prievew my images in this type of window when somebody roll at thumbnail image.

I tried to copy this script form themplatemonster but it's very complicatedn & little messed there. I know just a little about javascript...

Please help me...

carbon
09-01-2006, 01:10 PM
anyone helps?

vwphillips
09-01-2006, 02:30 PM
simplest


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>
<script type="text/javascript">
<!--

var Obj;
function ToolTip(obj,con,x,y){
Obj=document.getElementById('Pop');
Obj.innerHTML=con;
Obj.style.left=(zxcPos(obj)[0]+x)+'px';
Obj.style.top=(zxcPos(obj)[1]+y)+'px';
Obj.style.visibility='visible';
}

function Hide(){
Obj.style.visibility='hidden';
}

function zxcPos(zxcobj){
zxclft=zxcobj.offsetLeft;
zxctop=zxcobj.offsetTop;
while(zxcobj.offsetParent!=null){
zxcpar=zxcobj.offsetParent;
zxclft+=zxcpar.offsetLeft;
zxctop+=zxcpar.offsetTop;
zxcobj=zxcpar;
}
return [zxclft,zxctop];
}


//-->
</script>

</head>

<body>
<center>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div onmouseout="Hide();" style="width:100px;" onmouseover="ToolTip(this,'<img src=http://www.vicsjavascripts.org.uk/StdImages/One.gif width=200 height=200 >',-10,20)" >Link</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<img src=http://www.vicsjavascripts.org.uk/StdImages/Three.gif width=40 height=20 onmouseout="Hide();" style="width:100px;" onmouseover="ToolTip(this,'<img src=http://www.vicsjavascripts.org.uk/StdImages/Three.gif width=200 height=100 >',-10,20)" >
</center>

<div id="Pop" style="position:absolute;" ></div>

</body>

</html>

or google tool tip

aladdin36
09-07-2006, 05:25 PM
Hi vwphillips,

Many thanks for the script, I was searching like hell in the web for about a month for such sort of simple script for thumbnail view.

really a great relief for me. Thank you and Thank God..

above all Many thanks to CodingForums.com

regards,
Sreen

SidlyDerious
09-17-2006, 10:05 AM
Seeing this post led me to register straight away

a no nonsense response from a knowledgable coder

Great to see

SD



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum