Thumbnail leading to a larger pic in a seperate pop up window
Hi Everybody
How do I do this ??? ...
Smaller pic which when clicked on opens up a seperate pop up window with that same pic in it but much larger , I wanna be able to control the size of the pop up window that opens .... ( I want the pop up window to be the size of the larger pic thats in it ) .
Thanks
Last edited by Webbie2003; 04-01-2003 at 06:47 AM.
I think that's what you're looking for (I used it a lot on my site, it works well)
To have bigger image in popup from a thumb:
Put this between <HEAD> and </HEAD> only once!
<SCRIPT LANGUAGE="JavaScript"><!--
/*
To be put only once in the header of the page
*/
function afficheVignette(cheminVignette,cheminMaxi)
{
document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" HSPACE=0 VSPACE=0 BORDER=0 ALT="clich here to enlarge"></A>');
}
function afficheMaxi(chemin)
{
i1 = new Image;
i1.src = chemin;
html = '<HTML><HEAD><TITLE>Image</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+32)"></CENTER></BODY></HTML>';
popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
popupImage.document.open();
popupImage.document.write(html);
popupImage.document.close()
};
// -->
</SCRIPT>
To be put between the <BODY> and </BODY> of your page where the pic should go
I use MS front Page... haven't gotten to the big leagues yet.
If you use MSFP try this... insert your picture into the place you want it on your page. Click on the picture and click CTRL+T... it'll auomatically make a thumbnail. Then go into hyperlink settings - Target Settings - New Window. Ths is how I do it since I am HTML writing illiterate. I am just figuring out how to plug things into the HTML script to change things. No formal schooling obviously.
"Assault weapons have gotten a lot of bad press
lately but they're manufactured for a reason;
to take out today's modern super-animals,
such as the flying squirrel and the electric eel."
- Lenny
The Simpsons
Bookmarks