executing dynamically generated code (eval)?
Hi there, is there a kind of dtml-eval command? I'd like to execute dynamicly generated code like: <dtml-var <dtml-var someting>>. Thank you Marcus
I thought that it was *not* possible to nest dtml like that meaning that you might have to use the python eval ... or am I missing something here? Patrick. On Tue, 1 May 2001, Marcus Schopen wrote:
Hi there,
is there a kind of dtml-eval command?
I'd like to execute dynamicly generated code like: <dtml-var <dtml-var someting>>.
Thank you Marcus
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Marcus, for security reasons there is none :-) What do you want to achieve? Regards Tino --On Dienstag, 1. Mai 2001 22:16 +0200 Marcus Schopen <marcus.schopen@uni-bielefeld.de> wrote:
Hi there,
is there a kind of dtml-eval command?
I'd like to execute dynamicly generated code like: <dtml-var <dtml-var someting>>.
Thank you Marcus
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Marcus Schopen wrote:
Hi there,
is there a kind of dtml-eval command?
I'd like to execute dynamicly generated code like: <dtml-var <dtml-var someting>>.
AFAIK that is restricted for security reasons. Depending on exactly what you want to do, you can dynamically create javascript and execute it. In FreePM I create the patient note by selecting text stubs with checkboxes, radio buttons, etc. Then send that to a JS function that writes it to a textarea. Is that like what you want to do? HTH, -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
You may try either one of these: <dtml-var "_.getitem('any_method', 1)"> <dtml-var "_['any_method']"> getitem is a method of the special namespace variable, _ , and besides of the name argument it accepts a flag (1 or 0). When true, the current 'any_method' will be called and processed, if has logic within, and the result will be returned. When false, only the plain content of the method is returned. Ausum Marcus Schopen wrote:
Hi there,
is there a kind of dtml-eval command?
I'd like to execute dynamicly generated code like: <dtml-var <dtml-var someting>>.
Thank you Marcus
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Ausum -
Marcus Schopen -
Patrick -
Tim Cook -
Tino Wildenhain