The ugly way out of this is to output the comments using 

<t:outputraw value="commentStart">

and in java 

public String getCommentStart(){
    return "<!--";
}

and the same to the comment ending.

This also applies to different [CDATA etc. things.

If someone knows more elegant way please share...

 - Ville


Felix Gonschorek wrote:
> 
> it does not work becaus the variable is in <!-- xxx --> html comments -
> tapestry 
> does not evaluate markup in html/xml comments.
> 
> felix
> 
> Kristian Marinkovic schrieb:
>> never did this myself, but i think this should work somehow if there
>> is a myid property...
>> 
>> instead... you could use the RenderSupport service to render your 
>> script programmatically
>> 
>> g,
>> kris
>> 
>> 
>> 
>> 
>> Angelo Chen <angelochen...@yahoo.com.hk> 
>> 05.05.2009 09:22
>> Bitte antworten an
>> "Tapestry users" <users@tapestry.apache.org>
>> 
>> 
>> An
>> users@tapestry.apache.org
>> Kopie
>> 
>> Thema
>> t5: embed a variable in a javascript in a tml?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Hi,
>> 
>> I'd like to get myid from the page,  but following code will not work,
>> the
>> line:
>> 
>> var google_conversion_id = "${myid}"
>> 
>> will be rendered as it is, it is not as what I expected
>> 
>> var google_conversion_id = "12345678"
>> 
>> any idea how to embed a variable in a javascript in the template? thanks
>> 
>> Anelo
>> 
>> 
>> <script language="JavaScript" type="text/javascript">
>> <!--
>> var google_conversion_id = ${myid}
>> var google_conversion_language = "en_US";
>> var google_conversion_format = "3";
>> var google_conversion_color = "ffffff"
>> //-->
>> </script>
> 
> -- 
> Felix Gonschorek
> GG-Media
> 
> Kirchstr. 18
> 69115 Heidelberg
> 
> Tel: +49 6221 890 168-0
> Fax: +49 6221 890 168-1
> Mobil: +49 176 2234 1338
> 
> fe...@gg-media.biz
> http://www.gg-media.biz
> 
> Vertretungsberechtigte Gesellschafter:
> Felix Gonschorek & Jochen Greiner
> 
> Umsatzsteuer-Identifikationsnummer
> gemäß § 27a Umsatzsteuergesetz:
> DE232906440
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-embed-a-variable-in-a-javascript-in-a-tml--tp23382334p23387164.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to