Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

more on thumbnails

Status
Not open for further replies.

ront02769

MIS
Apr 16, 2001
21
0
0
US
hi. have gotten my thumbnail problem MOSTLY straigntened out. NOW what I need is a way to have the pix referred to come up nice and neat in the middle of the page.

I did it with individual player pix by having a seprate htm page for eACH player with appropriate size pix, some bio stuff, etc. on it.

but is there an EASIER way to have several DOZEN pix come up properly without making a separate page for each??

site is at
thanks.

ront
 
Well, this might seem a little complicated, but if you don't want an entire .htm page for EACH picture, you could make 1 .asp page.

Ok, you're going to love me for this. I'm going to point you to a url, take a look and tell what you think. This is exactly what you have now, but ONLY 2 PAGES, instead of the extra 8, one for each picture.

It's a really easy script, and you'll have no problem managing it.


check it out. ~Javrix

A broken clock is correct twice per day.

A roomful of monkeys on typwriters will eventually write the great american novel.

If you gave an infinate number of rednecks, an infinate number of shotguns to shoot at an infinate number of stree
 
THANKS! looks like a good approach. being mostly totally new to the thing though I'm going to have to spend some time figuring out the code.

thanks again!!!!

ront
 
Ok, if you want to keep it like that, this is what you need to do:

Step 1) rename all your pictures to just numbers, this way you can add more if your site expands. The thumbnails, name t1.jpg, t2.jpg, etc.

Step 2) Do whatever you want to the htm page. But kill the links on the pictures. And add this code to the page, this is the "I want to see picture" code:

<FORM ACTION=&quot;rontspagepicture.asp&quot; METHOD=&quot;post&quot;>
I want to see
<select name=&quot;picture&quot; size=&quot;1&quot;>
<option value=&quot;1&quot;>Picture 1</option>
<option value=&quot;2&quot;>Picture 2</option>
<option value=&quot;3&quot;>Picture 3</option>
<option value=&quot;4&quot;>Picture 4</option>
<option value=&quot;5&quot;>Picture 5</option>
<option value=&quot;6&quot;>Picture 6</option>
<option value=&quot;7&quot;>Picture 7</option>
<option value=&quot;8&quot;>Picture 8</option>
</select>
<INPUT TYPE=&quot;submit&quot; VALUE=&quot;Go&quot;>
</FORM>

Remember, you can put this anywhere on the page. You can rename the &quot;rontspagepicture.asp&quot; to anything you want, just remember to keep the .asp at the end!

Step 3) Ok, I'm going to give you a huge crash course on ASP. Don't worry, it's not hard, and you'll understand it!

This is the ENTIRE .asp page that your pictures show up as. Let's take a look and then rip it apart:

<% @Language=VBScript %>
<%
dim picture
picture=Request.Form(&quot;picture&quot;)
%>
<html>
<head>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1252&quot;>
<title>Ront's Page - Picture <%=picture%></title>
</head>
<BODY BGCOLOR=&quot;FFFFFF&quot; TEXT=&quot;000000&quot;>
<CENTER>
<TABLE WIDTH=&quot;750&quot; VALIGN=&quot;top&quot; ALIGN=&quot;center&quot;>
<TR>
<TD VALIGN=&quot;middle&quot; ALIGN=&quot;center&quot;>
<H3>
Over 35's in their 4-0 win. May 6th, 2001
</H3>
<P>
<H2>Picture <%=picture%></H2>
<BR>
<IMG SRC=&quot;<%=picture%>.jpg&quot; ALT=&quot;Picture <%=picture%>&quot;>
</TD>
</TR>
</TABLE>
</body>
</html>

Not to scary, eh? Ok, the first thing is the <% %> tags. These are new then regular < > HTML tags. They're asp tags. ASP is another web language. The cool thing about asp language/tags is that when someone looks at the page, they don't see them. Try looking at the source of the .asp page, you won't see any asp tags at all.

The first line in the page is &quot;<% @Language=VBScript %>&quot;.
Don't worry about this line for now.

The next thing is &quot;dim picture&quot;. &quot;dim&quot; means we're telling the page this is a variable. We called the variable &quot;picture&quot;. Easy enough.

Next we tell what &quot;picture&quot; is, and what it is supposed to do.

&quot;picture=Request.Form(&quot;picture&quot;)&quot;

This looks kinda scary, but take deep breath, it's not that hard. First we say &quot;picture=&quot;. Again, this means that we're telling the page what picture is and what it's going to do. Next we have &quot;Request.Form&quot; This means we're requesting information from the form. What form? The form from the last page. Remember, the person selects which picture they want to see, then they hit &quot;go&quot;. That's all in the form page, and it sent the information that the person selected to this page.
Next we have &quot; (&quot;picture&quot;) &quot;. Remember the <SELECT> tag from the last page? Well it's &quot;name&quot; was picture. So we're requesting information from the form that was called &quot;picture&quot;.

Ok, so let's take a step back and look at. Let's say I selected picture 3. The &quot;value&quot; of picture 3 is &quot;3&quot;. We hit &quot;go&quot; and it takes us to the next page. All of that fancy ASP code does the magic for us. It get's whatever information we sent from the previous page, in this case &quot;3&quot;. Making sense? I hope so. So now, throughout the rest of the page, our &quot;picture&quot; is actually the value of &quot;3&quot;.

So in the <TITLE> tag in our .asp page, we see it says:

<title>Ront's Page - Picture <%=picture%></title>

There's an ASP tag again. &quot;<%=picture%>&quot; means it's going to display whatever picture is. In this case, 3. So when you see the page, you won't see <%=picture%>, you'll just see 3. The same throughout the rest of the page. It's going to display <%=picture%>.jpg. So in this case 3.jpg. And like magic, it pulls up that picture.

If you have any problems, let me know. I always try to respond fast!

Hope this makes sense and helps! ~Javrix

A broken clock is correct twice per day.

A roomful of monkeys on typwriters will eventually write the great american novel.

If you gave an infinate number of rednecks, an infinate number of shotguns to shoot at an infinate number of stree
 
One other thing. If you try to run the .asp page on your computer at home (not from the net), it will not work. Why? You have to set up this thing called IIS and it gets kinda ugly. So type (or copy and paste) the script, throw it on the net, and then test it and look at it.

Tell me if you have any problems. I am the ASP and HTML god. :) ~Javrix

A broken clock is correct twice per day.

A roomful of monkeys on typwriters will eventually write the great american novel.

If you gave an infinate number of rednecks, an infinate number of shotguns to shoot at an infinate number of stree
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top