Indian television shows news - Debt Consolidation - Creative Electronics - Italian Property - WoW Gold

PDA

View Full Version : Javascript popup windows - Need help


nals
Jan 30th 2008, 7:29 pm
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>

nals
Jan 30th 2008, 11:50 pm
please help me someone

fairuz.ismail
Jan 31st 2008, 12:07 am
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.

MMJ
Jan 31st 2008, 8:45 am
<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>