I'm not sure about the best solution for this but have you tried replacing <
with &lt; to make the parser happy about well formed html ?

(or do a <script><!-- --></script> style comment block ? )

On 6/27/07, Martin Dietze <[EMAIL PROTECTED]> 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

--
----------- / http://herbert.the-little-red-haired-girl.org /
-------------
=+=
Yoda of Borg I am. Assimilated you will be.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to