Layout depending on simple results of a calculation

  • Thread starter Thread starter Badass Scotsman
  • Start date Start date
B

Badass Scotsman

Classic ASP / VBScript question, I don't have access to any classic ASP
group, apologies.

This may seem a bizarre question, however I would like to be able to assign
numerical values to 5 different tables dynamically, for example:

<table ID="1">
<table ID="2">
<table ID="3">
<table ID="4">
<table ID="5">

And then, order them on the page in ASCENDING order, no database interaction
here.

I will have a page URL as follows:

tables.asp?Table1ID=10&Table2ID=20&Table3ID=30 and so on...these parameters
are what will determine the ordering and layout of the tables.

Any ideas? Struggling to come up with anything here :(

Any help greatly appreciated.

Regards,

Gary.
 
Gary,

Start by putting your tableids into an array:

arrTables(4)

arrTables(0) = Request.QueryString("Table1Id")
arrTables(1) = Request.QueryString("Table2Id")
....
arrTables(4) = Request.QueryString("Table5Id")

Then use a for next loop to loop through them creating your tables:

Dim TableString
TableString = ""

For i = 0 To UBound(arrTables)
TableString = TableString & "<table ID=""" & arrTables(i) & """>"
Next


I've been using asp.net 1.0 - 2.0 since it first came out in beta 5 or so
years ago now so my vbscript is very rusty but that's the idea.

Good luck with it and happy programming!

Regards,


--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

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

Back
Top