Never mind!! I fixed it, it should have been -
document.ManageSiteLinksForm.preVTL.value="\#if(\$SITE.getSiteDocs().size() > 0)";

- Manish



----- Original Message ----- From: "Manish" <[EMAIL PROTECTED]>
To: "Velocity Users List" <[email protected]>
Sent: Thursday, February 08, 2007 1:26 PM
Subject: Escaping VTL in a string


For some HTML form, I need to set value of variable as VTL string, but I want that value to be taken as "raw" VTL string and not as evaluated VTL string. This is what I am doing in the JavaScript of my .vm file --

document.ManageSiteLinksForm.preVTL.value="\#if($SITE.getSiteDocs().size() > 0)";

but this evaluates to #if(0 > 0) and not \#if($SITE.getSiteDocs().size() > 0) that I want

How can I achieve this?? How can escape executing of this VTL inside the string??? "\" doesn't seem to do that

TIA,
- Manish




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




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

Reply via email to