sequence of images

J

Johnfli

I have a web page that I am trying to have it display a series of images.
I have my images on teh server named as numbers. (0123.jpg 0124.jpg
0125.jpg)
instead of having to manually place each image, I would like to be able to
have a for/next loop do it for me.
By doing it manually, the code looks like this:

<img border="0" src="http://www.mywebserver/images/Picture-0368.jpg"
width="533" height="800">

What I would like to do is somethign like this

for x = 100 to 150

<img border="0" src="http://www.mywebserver/images/Picture-0<% x %> "
width="533" height="800">

Next

Yet, as you can tell, It doesn't work.
Can someone please tell me teh proper way to insert teh varible X in the
line so it will display correctly?
 
S

Stefan B Rusynko

That's going to be one heck of a page
50 Images on a single page - each 800px high
(IMHO no one will scroll thru the equivalent of over 10 pages )
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Actually, that would get the number but not the file extension. It would
| come out as Picture-0100 etc. Should be <%=x%>.jpg
|
| Ex:
|
| <%
| for x = 100 to 150
| %>
|
| <img border="0" src="http://www.mywebserver/images/Picture-0<%=x%>.jpg"
| width="533" height="800">
|
| <%
| Next
| %>
|
|
| | > lt should be <%=x%>
| >
| > Bob Lehmann
| >
| > | >> I have a web page that I am trying to have it display a series of images.
| >> I have my images on teh server named as numbers. (0123.jpg 0124.jpg
| >> 0125.jpg)
| >> instead of having to manually place each image, I would like to be able
| >> to
| >> have a for/next loop do it for me.
| >> By doing it manually, the code looks like this:
| >>
| >> <img border="0" src="http://www.mywebserver/images/Picture-0368.jpg"
| >> width="533" height="800">
| >>
| >> What I would like to do is somethign like this
| >>
| >> for x = 100 to 150
| >>
| >> <img border="0" src="http://www.mywebserver/images/Picture-0<% x %> "
| >> width="533" height="800">
| >>
| >> Next
| >>
| >> Yet, as you can tell, It doesn't work.
| >> Can someone please tell me teh proper way to insert teh varible X in the
| >> line so it will display correctly?
| >>
| >>
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top