Pass a Javascript Object on The Server Side to The Client Side rename

author:

contributor:

published:

updated:

source uri:

Summary

Often, your server-side code queries Freebase for data, and then it needs to pass some or all of...

Content

Often, your server-side code queries Freebase for data, and then it needs to pass some or all of that data to the client-side code (Javascript) so that the client-side code can support dynamic behaviors based on that data. You can do this using the ${ } substitution just like you would in a normal mjt template

>
> var my_var = { "foo" : 1 }; // This is evaluated on the server
>
>
>

On the client side, the code looks like

>

Created by: dfhuynh via Cookbook Jun 4, 2009
Last edited by: alexbl via Cookbook Jul 29, 2009

Recent Discussions about Pass a Javascript Object on The Server Side to The Client Side

There is no discussion about this document.

Start the Discussion »
Explore the Data
View all the data we have for Pass a Javascript Object on The Server Side to The Client Side
Flag this Document
Why do you want to flag this document?