Thanks.  But why I can't use <% tag and ns_adp_puts
function with OpenACS?  The error I get is:

This function cannot be used outside of an ADP
    while executing
"ns_adp_puts "test" "
    ("uplevel" body line 32)
    invoked from within
"uplevel {
          set __adp_output ""

Is there any change to config.tcl I have to make?

<%= tag works fine though.

Wei


--- Carson Evans <[EMAIL PROTECTED]> wrote:
> <%
> ns_adp_puts "<table>"
> for {set i 0} {$i < 2} {incr i} {
>    ns_adp_puts "<tr>"
>    for {set j 0} {$j < 3} {incr j} {
>       ns_adp_puts "<td>r$i.c$j</td>"
>    }
>    ns_adp_puts "</tr>"
> }
> ns_adp_puts "</table>"
> %>
>
> You could also do it with Foreach, or a while.
>
> -----Original Message-----
> From: AOLserver Discussion
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Wei Shi
> Sent: Sunday, May 23, 2004 10:31 PM
> To: [EMAIL PROTECTED]
> Subject: [AOLSERVER] loop in adp
>
> Hi, does anybody know a way of writing loop in .adp
> file?  For example, I
> would like to have the following HTML output:
>
> <table>
>   <tr>
>     <td>r1.c1</td>
>     <td>r1.c2</td>
>     <td>r1.c3</td>
>   </tr>
>   <tr>
>     <td>r2.c1</td>
>     <td>r2.c2</td>
>     <td>r2.c3</td>
>   </tr>
> </table>
>
> The content of table are filled by .tcl script, and
> the number of row and
> column may change depending on the output of .tcl
> file.  Is there a way to
> write a generic .adp file that can handle any number
> of row and columns?
>
> Thanks.
>
> Wei
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an
> email to
> <[EMAIL PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message.
> You can leave the Subject:
> field of your email blank.
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an
> email to <[EMAIL PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message.
> You can leave the Subject: field of your email
blank.





__________________________________
Do you Yahoo!?
Yahoo! Domains � Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to