Jeremy Dunck wrote:
> On 1/19/07, rzimerman <[EMAIL PROTECTED]> wrote:
> >
> > I'd like to pass variable values from Django to client-side JavaScript
> > at page load time. Currently I've use Django's templating system to
> > dynamically rewrite the JavaScript code, such that the appropriate
> > v
The JSON method mentioned above should work fine.
Two methods that might be less fragile than code generation:
- Hidden form inputs. Less fragile because the 'escape' filter should
allow you to safely dump data into attribute values in your template, I
think. Then use form.elements or MochiKit'
On 1/19/07, rzimerman <[EMAIL PROTECTED]> wrote:
I'd like to pass variable values from Django to client-side JavaScript
at page load time. Currently I've use Django's templating system to
dynamically rewrite the JavaScript code, such that the appropriate
values get set. But, is there a less hac
On 1/19/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
var foo = {{ data }};
alert(data['bouzouki']);
Err, that should be:
alert(foo['bouzouki'])
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" grou
4 matches
Mail list logo