Results 1 to 5 of 5

Thread: Dynamic HTML tables

  1. #1

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Smile

    Can anyone tell me how to create a dynamic html table that will automatically size itself to the number of records/rows requested in an SQL querry?

    Cheers 'n' beers.
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Hi skeen

    Are you trying to this using ASP or vbscript?
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Thumbs up

    Hi Ian

    I'm using asp's and VBscript as the scripting language.
    I can use sql and am getting fairly profficient at VBscript, but I've never really used HTML other than knocking a quick page together, so yes asp's and yep VBscript,

    Nice 1

    Skeen
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Hi skeen

    The way do create a table using a database in ASP is in fact quite easy. All you need to so is open your recordset and do the following

    <TABLE>
    <%
    While Not Recordset.Eof
    %>
    <TR>
    <TD>
    <% = Recordset("Myfield1") %>
    </TD>
    <TD>
    <% = Recordset("Myfield1") %>
    </TD>
    <TD>
    <% = Recordset("Myfield2") %>
    </TD>
    <TD>
    <% = Recordset("Myfield3") %>
    </TD>
    </TR>
    <%
    Recordset.MoveNext
    Next
    %>
    </TABLE>

    You can mix and match your recordset around to get your desired affect.

    The best thing I can suggest to you when making asp pages that are heavily made froma database is to design your pahe first as a standard HTML page, then convert it to an ASP page and subsitute the data into code to retrive it.

    Hope this helps

    Ian

    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  5. #5

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Smile Cheers

    Nice1 Ian - worked a treat.
    Thanx 4 the help, believe me I need it!

    Thanx again

    Skeen.
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width