Author Topic: Homepage  (Read 1777 times)

0 Members and 1 Guest are viewing this topic.

Offline Itsara

  • 26
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?  

 

Offline joek

  • Heh heh... not funny.
  • 27
    • http://www.joek.com/
Should I handle this one (I'll also give myself a pimp    )?

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 of my new screenshots page 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.    

Joe.

------------------
www.joek.com
Revelations: A FS2 Campaign

[This message has been edited by joek (edited 08-11-2001).]

[This message has been edited by joek (edited 08-11-2001).]
No, he's not back for real, just popping his head in to say "hello" while on break from classes.

 

Offline Itsara

  • 26
Well i want it like yours so what is the script i need?  Oh and thanks for your help.  

  

Offline joek

  • Heh heh... not funny.
  • 27
    • http://www.joek.com/
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
Revelations: A FS2 Campaign

[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).]
No, he's not back for real, just popping his head in to say "hello" while on break from classes.

 

Offline Itsara

  • 26
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).]