[Zope] Problem with passing <input type=hidden value='<dtml-var
nbMenu>' name=nbMenu> from an external Method
Tino Wildenhain
tino@wildenhain.de
Fri, 23 Mar 2001 10:56:19 +0100
Hi Servel,
servel yannick wrote:
>
> Hi all,
>
> Source code of SaveMenu.html
>
> <dtml-var "SaveMenu(REQUEST=REQUEST)">
>
> Source code of the external method SaveMenu
>
> def SaveMenu(self, REQUEST=None):
> s=""
> i = 1
> s = s +"<input type=hidden value='<dtml-var nbMenu>' name=nbMenu>"
> return s
>
> And here is the code returned when SaveMenu is executed:
>
> <input type=hidden value='<dtml-var nbMenu>' name=nbMenu>
>
> instead of value='<dtml-var nbMenu>' I should have value=(an integer)
>
> Is there an alternative solution to fix that problem?
Its clearly:
def SaveMenu(self, REQUEST=None):
return('<input type="hidden" value="%s" name="nbMenu">' % nbMenu)
1) what are you doing with i = 1 here?
2) sure to have nbMenu in the methods namespace?
Regards
Tino