Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Looking for.....

    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.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    Have you tried the search facility on this site? Or Google?

    Some examples:-

    http://www.huntingground.freeserve.c...img_thumbs.htm

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

  • #3
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!!!!!

    Code:
    <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='+popHeight+',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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •