yes it is a js problem ...... But I was looking for a way in which I
can use Django Variables passed by a view function inside a statically
served js ....... since it's static, the template engine won't parse
it .....

On May 25, 12:38 am, Rodrigue Villetard <rodrigue.villet...@gmail.com>
wrote:
> Hello,
>
> I think you can use xyz.js as a template :
>  return render_to_response('xyz.js'
>
>
>
> > {'variable':value})
>
> Your problem is more a javscript problem of variable visibility as <script
> src="xyz.js"> doesn't properly make an include.
>
> regards.
>
> 2010/5/24 gvkalra <gvka...@gmail.com>
>
>
>
> > Hi.
> > I am trying to do something like this:
>
> > views.py
>
> > return render_to_response('abc.html',{'variable':value})
>
> > abc.html
>
> > <script>
> > dummy = {{variable}};
> > </script>
> > <script src = "xyz.js"/>
>
> > My problem:
> > I am not able to use dummy inside xyz.js ....... OR is there some
> > other way by which I can use {{variable}} inside xyz.js ??
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Rodrigue Villetard
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to