...

View Full Version : Looking for.....



nagravip
12-17-2007, 09:32 AM
Hi guys I'm looking for a script to preview and enlarge an image when you pass with mouse on top of it,can someone tell me if this was allresdy done and where can i get it,regards.:thumbsup:

Philip M
12-17-2007, 10:16 AM
Have you tried the search facility on this site? Or Google?

Some examples:-

http://www.huntingground.freeserve.co.uk/imagery/img_thumbs.htm

http://icant.co.uk/articles/imagepreview/

nagravip
12-17-2007, 04:48 PM
Thanks for your reply,the links you have sent me where a great help to try to understand this type of language that I'm trying to learn but the similar of what I'm looking for is this and it need to be clicked and I wanted something like just mouseover and show a preview in bigger scale,what do I need to change in this code to do it and can I inserted into a vbulletin page!!!!!


<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
<script type="text/javascript">
<!--

myImages=new Array() // large images
myImages[0]="pic01.jpg"
myImages[1]="pic02.jpg"
myImages[2]="pic03.jpg"
myImages[3]="pic04.jpg"
myImages[4]="pic05.jpg"
myImages[5]="pic06.jpg"
myImages[6]="pic07.jpg"
myImages[7]="pic08.jpg"
myImages[8]="pic09.jpg"
myImages[9]="pic10.jpg"
myImages[10]="pic11.jpg"
myImages[11]="pic12.jpg"

preloadImages=new Array()
for(var i=0;i<myImages.length;i++){
preloadImages[i]=new Image()
preloadImages[i].src=myImages[i]
}

alwaysCenter=1 // 0 = no 1 = yes
popLeft=0 // popup default left, use if not centering
popTop=0 // popup default top, use if not centering

IEoffsetWidth=20
IEoffsetHeight=25

i=0
lastNum=""
popUpName=null

function newWin(num){
popWidth=preloadImages[num].width+IEoffsetWidth
popHeight=preloadImages[num].height+IEoffsetHeight

if(alwaysCenter==1){
popLeft = (screen.availWidth - popWidth) / 2
popTop = (screen.availHeight - popHeight) / 2
}

if(popUpName&&popUpName.closed){
popUpName=null
i=0
}

if(popUpName&&!popUpName.closed){
popUpName.close()
popUpName=null
i=0
if(num==lastNum){i++} // if same link clicked
}


i++

if (i==1){

popUpName=window.open('','win1','left='+popLeft+',top='+popTop+',width='+popWidth+',height='+popHeig ht+',scrollbars=0,resizable=0')

popUpName.document.write("<html>\n<head>\n<title>The
Bigger Picture</title>\n</head>\n<body
style=\"background-color:black\">")

popUpName.document.write("<img src="+myImages[num]+">")

popUpName.document.write("</body>\n</html>")

popUpName.focus()

}

else{

i=0

}

lastNum=num

}

//-->
</script>


</HEAD>
<BODY>

<img src="pic1_small.jpg" onclick="newWin(0)"><br>
<img src="pic2_small.jpg" onclick="newWin(1)"><br>
<img src="pic3_small.jpg" onclick="newWin(2)"><br>
<img src="pic4_small.jpg" onclick="newWin(3)"><br>
<img src="pic5_small.jpg" onclick="newWin(4)"><br>
<img src="pic6_small.jpg" onclick="newWin(5)"><br>
<img src="pic7_small.jpg" onclick="newWin(6)"><br>
<img src="pic8_small.jpg" onclick="newWin(7)"><br>
<img src="pic9_small.jpg" onclick="newWin(8)"><br>
<img src="pic10_small.jpg" onclick="newWin(9)"><br>
<img src="pic11_small.jpg" onclick="newWin(10)"><br>
<img src="pic12_small.jpg" onclick="newWin(11)"><br>

</BODY>
</HTML>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum