Results 1 to 7 of 7

Thread: Dynamic table

  1. #1
    Join Date
    Jan 2004
    Posts
    10

    Unanswered: Dynamic table

    i want to dynamic create table,
    example :for i=1 to j
    if j<7
    and one row cotains j column
    but if j >7
    auto change the 2nd row

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    html table ... database table ??? Please be more specific.

  3. #3
    Join Date
    Jan 2004
    Posts
    10
    html table

  4. #4
    Join Date
    Dec 2003
    Posts
    454
    Post the details.

  5. #5
    Join Date
    Jan 2004
    Posts
    10

    create dynamic html table

    code :

    <table>
    <tr>
    <%for i=0 to 10%><td>my test</td>
    <%next%>
    </tr>
    </table>

    now,i want when i<7,the 1st row auto change 2nd row;

    example:

    my test my test my test my test my test my test my test

    my test my test my test my test

  6. #6
    Join Date
    Dec 2003
    Posts
    454
    <table>
    <%dim rowStartTag : rowStartTag="<tr>"%>
    <%dim rowEndTag : rowEndTag="</tr>"%>
    <%for i=0 to 10%>
    <%if i=0%>
    <%=rowStartTag%>
    <%end if%>
    <td>my test</td>
    <%if i=6%>
    <%=rowEndTag%>
    <%end if%>
    <%if i=7%>
    <%=rowStartTag%>
    <%end if%>
    <td>my test</td>
    <%if i=10%>
    <%=rowEndTag%>
    <%end if%>
    <%next%>
    </table>

  7. #7
    Join Date
    Dec 2003
    Posts
    454
    I did some modification and that will show you the page like

    =================================================
    | my test | my test | my test | my test | my test | my test | my test |
    | my test | my test | my test | my test |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;|
    =================================================

    <table>
    <%dim rowStartTag : rowStartTag="<tr>"%>
    <%dim rowEndTag : rowEndTag="</tr>"%>
    <%for i=0 to 10%>
    <%if i=0%>
    <%=rowStartTag%>
    <%end if%>
    <td>my test</td>
    <%if i=6%>
    <%=rowEndTag%>
    <%end if%>
    <%if i=7%>
    <%=rowStartTag%>
    <%end if%>
    <td>my test</td>
    <%if i=10%>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <%=rowEndTag%>
    <%end if%>
    <%next%>
    </table>
    Last edited by gyuan; 01-11-04 at 13:16.

Posting Permissions

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