Hard Light Productions Forums
Off-Topic Discussion => General Discussion => Topic started by: Itsara on August 11, 2001, 10:50:00 pm
-
I am kind of a newbie to making pages and i was wondering how to, when you click on a picture to make it bigger. Like it says "click to enlarge" how do i make it so if you click on it it enlarges? (http://dynamic.gamespy.com/~freespace/ubb/noncgi/smile.gif)
-
Should I handle this one (I'll also give myself a pimp (http://dynamic.gamespy.com/~freespace/ubb/noncgi/biggrin.gif))?
Do you mean to enlarge in a pop-up window, or just a larger image?
To do just a larger image, save one image as small (render_sm.jpg
) and a second one as your large/original size (render.jpg
). Then simply put the small image on your page and link it to the large one: <A HREF="render.jpg"><IMG SRC="render_sm.jpg" BORDER="0" WIDTH="150" HEIGHT="100" ALT="My first render">[/url]
Now, if you want to do it with the pop-up, view the source ("http://view-source:http://www.joek.com/other/freespace/rev_screens.shtml") of my new screenshots page ("http://www.joek.com/other/freespace/rev_screens.shtml") for the block of <SCRIPT>
code just above the </HEAD>
. Using this with the <A HREF>
's you can make a pop-up larger image.
If you got more questions, just ask. (http://dynamic.gamespy.com/~freespace/ubb/noncgi/smile.gif)
Joe.
------------------
www.joek.com ("http://www.joek.com/")
Revelations: A FS2 Campaign ("http://www.joek.com/other/freespace/")
[This message has been edited by joek (edited 08-11-2001).]
[This message has been edited by joek (edited 08-11-2001).]
-
Well i want it like yours so what is the script i need? Oh and thanks for your help. (http://dynamic.gamespy.com/~freespace/ubb/noncgi/smile.gif)
-
Put this in the
<HEAD>
of your page(s):
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function showPic(myURL, myName, myWidth, myHeight) {
picWin = window.open('', myName, 'width=' + myWidth + ',height=' + myHeight);
picWin.document.clear();
picWin.document.write('<HTML><BODY STYLE="margin: 0"><IMG SRC="' + myURL + '" WIDTH="' + myWidth + '" HEIGHT="' + myHeight + '" ALT=""><\/BODY><\/HTML>');
picWin.document.close();
}
//-->
</SCRIPT>
Note that you state the
And then for each image, this is the link:
<A HREF="javascript:showPic('/i/freespace/rev_screens/c3_laudstat.jpg', 'c3a', 640, 480)">
Note the location of the large image, and for the next value ("c3a"), use a different "name" for each link... this way each image link will open it's own window.
Also note that the next two numbers are the width and the height of the large image respectively.
Joe.
Edit: Yarg! Trying to keep all of the <'s and >'s out of sample code is hard.
------------------
www.joek.com ("http://www.joek.com/")
Revelations: A FS2 Campaign ("http://www.joek.com/other/freespace/")
[This message has been edited by joek (edited 08-11-2001).]
[This message has been edited by joek (edited 08-11-2001).]
[This message has been edited by joek (edited 08-11-2001).]
-
So for each smaller image i put, i make the link and to change the name, what part am i supposed to change? Also do i put the link in the link blank or in the HEAD section below the other script?
[This message has been edited by Itsara (edited 08-11-2001).]