for loop and image url VBscript

liunx

Guest
Hi there, Just new to VBscript and ASP.

I was wondering if it is possible to use a for loop to increment a variable such as 'i'. Then substitute 'i' into an image tag to display the image i.jpg

eg

<img src=http://www.htmlforums.com/archive/index.php/"i.jpg">

Can this be done so that each time the loop is incremented the appropriate image eg 1.jpg, 2.jpg, 3.jpg is displayed?

Thanks
Paul<%for i=1 to 3%>
<img src='http://www.htmlforums.com/archive/index.php/<%=i%>.jpg'/>
<%next%>

or....

<%
i=1
while i<4%>
<img src='http://www.htmlforums.com/archive/index.php/<%=i%>.jpg'/>
<%wend%>thanks very much putts,

i wasnt just sure if u could do that or not!

cheers!!

Paul
 
Back
Top