[Templates] sending javascript value to TT2

Bill Ward bill@wards.net
Wed, 6 Jun 2007 01:36:29 -0700


On 6/4/07, Josh Rosenbaum <josh@infogears.com> wrote:
> Rajkumar Natarajan wrote:
> > I am using Javascript to read a cookie. Now,  I want  to pass the
> > value  to  TT2.
> > How to pass javascript(vari)  to TT2(rate_email)  ?
> [SNIP]
>
> Javascript is processed in the browser (client-side), not by TT(server-side). You should be accessing the cookie via your backend/TT without the use of javascript.

The TT can place the value into a hidden field or generate a snippet
of JavaScript code to populate a variable....one of these should do:

<input type="hidden" name="something" value="[% something %]" />
<script>var something='[% something %]';</script>