You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <dc...@fixed.com> on 2003/11/15 22:10:52 UTC
[Script in html template] How to include a js statement in
Hi,
I was wondering how I can include a JS script statement, generated in
the java class, between the <script> </script> tags in the html template.
Basically I need the following snippet in my html template.
...
<script>
<!--
var st1 = new
top.frmScripts.ExtendedSortableTable(document.getElementById("table0"),
["String","Number", "None", "Date"]);
-->
</script>
...
I was thinking along the folowing lines:
<script>
<span jwcid="@Insert" value="ognl:scriptStatement"></span>
</script>
Whereby the scriptStatement would generate:
'<!-- var st1 = new
top.frmScripts.ExtendedSortableTable(document.getElementById("table0"),
["String","Number", "None", "Date"]); -->'
Would this be a sound way to go or are there better ways to accomplish this?
TIA,
Fermin DCG
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: [Script in html template] How to include a js statement in (DONE)
Posted by "F. Da Costa Gomez" <dc...@fixed.com>.
Never mind, I got something working (for now it will do)
F. Da Costa Gomez wrote:
> Hi,
>
> I was wondering how I can include a JS script statement, generated in
> the java class, between the <script> </script> tags in the html template.
>
> Basically I need the following snippet in my html template.
> ..
> <script>
> <!--
> var st1 = new
> top.frmScripts.ExtendedSortableTable(document.getElementById("table0"),
> ["String","Number", "None", "Date"]);
> -->
> </script>
> ..
>
> I was thinking along the folowing lines:
> <script>
> <span jwcid="@Insert" value="ognl:scriptStatement"></span>
> </script>
>
> Whereby the scriptStatement would generate:
> '<!-- var st1 = new
> top.frmScripts.ExtendedSortableTable(document.getElementById("table0"),
> ["String","Number", "None", "Date"]); -->'
>
> Would this be a sound way to go or are there better ways to accomplish
> this?
>
> TIA,
> Fermin DCG
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org