On Friday 12 January 2007 16:04, cwurld wrote:
>  Hi,
>
>  Does this make sense? I wanted some code to cycle thru some banner ads.
>  I could have done it with dojo doing a callback to my view, have my
>  view send the image path and the corresponding url, but that seemed
>  like a lot of activity for such a simple process.
>
>  Instead, I generated the javascript as a string, including the list of
>  images and urls as variables in the script, then I passed the string
>  containing the javascript code as a variable that got inserted in the
>  template. It works. But it seems like a strange way to solve this
>  problem.

You could use the JSON support in a view which just returns a chuck of JSON, 
which is just a javascript data structure, containing all your images and 
urls, then include that as an external script loaded by the page. 

John


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

Reply via email to