You'll get better advice from JS gurus, but I usually just reverse the condition:
for (var i = 0; someConstant >= i ; i++) { Cheers, Nick. Martin Dietze wrote:
Hi, I would like to add inline JavaScript code to a form depending on conditions set within the page class. I thus wrote code like this: | <script type="text/javascript"> | function myFunc() { | <t:if test="prop:myCondition"> | for (var i = 0; i < someConstant; i++) { | doSomethin(); | } | </t:if> | } | </script> This code causes problems since obviously Tapestry expects well-formed HTML code here (note the '<' character). I also run into problems if I put the inline JavaScript into HTML comments, the code gets completely ignored then. Since after each submit of the form the condition in the <t:if> changes I don't really see any alternative to this construct, or is there any fix/better way to do this? Cheers, Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]