On May 1, 12:38 pm, Pythoni <[EMAIL PROTECTED]> wrote:
> Michael,
> Thank you for your reply.
> I agree the solution with DIVs instead of IFRAMEs would be nice.
> But it needs AJAX. and you say a little AJAX.
> Can you give me an idea how to use that little AJAX together with my
> described problem?
> Thank you
> L.

I'll give it a good stab.  I'm not much of a JavaScript programmer,
but I understand the concepts surrounding AJAX.

Basically, your author links would call a javascript function that
uses XMLHttpRequest to retrieve the data for the descriptions.  It can
either return XML for your javascript to parse, or it can just return
the exact HTML you need for filling in the DIV.  An example for this
might be a simplified view template that just has the loop through the
data to display the markup and actual data, then replace the innerHTML
of the descriptions DIV with the data that's returned.  Instant re-
population.

I believe Django has most of what you need to simplify the generation
of the data already built-in.  It's just a matter of figuring out how
to glue the pieces together.

I'd suggest looking at James' example (http://www.b-list.org/weblog/
2006/07/31/django-tips-simple-ajax-example-part-1) for a start, and
just keep in mind the concepts.  The code part almost come naturally
if you know anything about JavaScript.

Hopefully, someone will read this and will be able to give you a
better, with code, example than I have. :)

HTH,

Michael


--~--~---------~--~----~------------~-------~--~----~
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