Javascript popup windows - Need help

Discussion in 'JavaScript' started by nals, Jan 30, 2008.

  1. #1
    Can someone please help me.
    View this http://www.sitepoint.com/examples/jscripttips/example_picfit.htm

    Instead of Image1, Image2, Image3 Text link .. How can i add a thumb image to that text link, I mean when i click thumb open up large image.

    here is the code for this text links..
    <HTML>
    	<HEAD>
    		<TITLE>The Image Gallery</TITLE>
    		<script language="Javascript"> 
    			function PopupPic(sPicURL) { 
    				window.open("popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
    			}
    		</script>
    	</HEAD>
    	<BODY bgcolor="#FFFFFF">
    		<a href="javascript:PopupPic('Image1.gif')">Image 1</a><br>
    		<a href="javascript:PopupPic('Image2.gif')">Image 2</a><br>
    		<a href="javascript:PopupPic('Image3.gif')">Image 3</a><br>
    	</BODY>
    </HTML>
    
    HTML:
     
    nals, Jan 30, 2008 IP
  2. nals

    nals Peon

    Messages:
    168
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    please help me someone
     
    nals, Jan 30, 2008 IP
  3. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you wan t to open a large image from a thumbnail, you use ajax for this;

    take a look here;
    http://jquery.com/demo/thickbox/

    If you dont understand how to use it, dont hesitate to PM me.
     
    fairuz.ismail, Jan 31, 2008 IP
  4. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <HTML>
        <HEAD>
            <TITLE>The Image Gallery</TITLE>
            <script language="Javascript">
                function PopupPic(sPicURL) {
                    window.open("popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
                }
            </script>
        </HEAD>
        <BODY bgcolor="#FFFFFF">
            <a href="javascript:PopupPic('Image1.gif')"><img src="mythumb.gif" /></a><br>
            <a href="javascript:PopupPic('Image2.gif')"><img src="mythumb.gif" /></a><br>
            <a href="javascript:PopupPic('Image3.gif')"><img src="mythumb.gif" /></a><br>
        </BODY>
    </HTML>
    HTML:
     
    MMJ, Jan 31, 2008 IP