Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 26th, 2004, 11:27 AM
Authorized User
 
Join Date: Jul 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nvillare
Default Creating an Image in a table

I am able to create a table with various images, however, it is a lot easier when it is a small amount of pictures. If my pictures are numbered from 1-100 and I want to create 5 pictures per row in the table, how can I do this using a variable. For example:

For i = 1 to number of pics divided by 5 to give me total rows

For j = 1 to number of total pics.

pictures are titled 1.jpg to 100.jpg. I have not done any VBScript in so long, that it's as if I am relearning everything.

Anyone have any ideas???

Thanks!

nvillare
__________________
Thanks!

N
Reply With Quote
  #2 (permalink)  
Old May 26th, 2004, 12:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

<table>
<tr>
<% For i = 1 to number_of_Pictures %>
<td>
    <img src="<%=i%>.jpg" ...>
</td>
<% If (i mod 5)=0 then %> 'To display 5 pics per row
   </tr><tr>
<% End If %>
<% Next %>
</tr>
</Table>

This should do the trick.;)

Cheers!

_________________________
-Vijay G
Strive for Perfection
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
creating table ph0neman Classic ASP Basics 3 January 22nd, 2008 05:06 PM
problem with creating table takwirira ASP.NET 1.x and 2.0 Application Design 0 March 18th, 2007 11:31 AM
Creating table with existing table without value kumar_kumar Oracle 1 January 4th, 2005 07:12 AM
Creating a medal table awood2000 XSLT 12 November 15th, 2004 07:26 AM
Creating an array of image Dinesh22 VB.NET 2002/2003 Basics 1 January 14th, 2004 09:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.