Re: [AOLSERVER] using variable in adp file

2008-03-16 Thread Xavier Bourguignon
I am sorry, wouldn't know about this, I am very new to aolserver. I set my singlescript param to 1 because I prefer it that way, may be there is something there indeed. On 16/03/2008, Bas Scheffers <[EMAIL PROTECTED]> wrote: > Well, this should work. Normally, anything between <% %> is executed >

Re: [AOLSERVER] using variable in adp file

2008-03-16 Thread Bas Scheffers
Well, this should work. Normally, anything between <% %> is executed in the global scope and as $REQ is in the global scope it should be accessible. I noticed you are using the new parser that allows you to do "... { %> some html <% } ...", something I have never done. Could it be this wo

Re: [AOLSERVER] using variable in adp file

2008-03-16 Thread Xavier Bourguignon
Bas, i forgot to attach my code, here is the procedure, it is called at the beginning of every request. proc ::gs_admin::req_init {conn arg why} { variable INIT global REQ catch {unset REQ} if {!$INIT} { ns_log Waning "==>::gs_admin

Re: [AOLSERVER] using variable in adp file

2008-03-16 Thread Xavier Bourguignon
Thanks for the answer Bas. I have done this now: set ::variablename value in adp: if {$::variablename} { blah } so it works now, but I have no idea as to why I should explicitly add the :: for this to work. The tcl code runs in a function which has been registered like this: ns_register_filte

Re: [AOLSERVER] using variable in adp file

2008-03-15 Thread Bas Scheffers
The correct way to just access a variable is: <%= $variable %> No need for "puts". This works also: <%= [clock seconds] %> Which puts the output of that command in the HTML. But it sounds like you have a scope problem. Any way you can post your actual code? If you set the variable inside

[AOLSERVER] using variable in adp file

2008-03-15 Thread Xavier Bourguignon
Hi, I have a variable set in my tcl code. e.g: set uname "myuname" how do I use this in my adp page?. e.g: Your username is: <%puts $uname%> It does not seem to work, everytime i get a tcl error saying that uname does not exists. I tried to make uname global, to no avail. Thank you -- Xavier