I don't think you can do this with a view and NOT refresh the page.

To get the functionality you want you need to use AJAX (and jquery would
make it easier).

do some research on how to use jquery to manipulate the dom and add HTML
elments to the page live.
There some jquery bits out there that'll allow you to manipulate the
document (read: page your on) through various click based events.

Start with a page that has a button on it (or a link) and put a
"<script>you're code goes here</script>" in there that gets called on the
"onClick" event that will then put a <p>Hello World</p> on the page.
That'll get you the basic functionality that you need (sorry I'm low on
resources for you, but there's plenty of stuff out there if you google it!)

n

On Fri, Sep 10, 2010 at 11:39 AM, mf <[email protected]> wrote:

> I'm working in a django view and I'd like to duplicate the
> items_rating value of myview when I click to "see more categories" in
> the template. All of this without refreshing the web.
>
> I think that I have to use jquery and Ajax to perform this action but
> I don't know how to do it. The examples I read about were about form
> submissions and I couldn't find a way to use it.
>
> views.py:
>
> def myview(request):
>    items_rating = 5
> html:
>
> <a href="#">See more categories</a>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<django-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Guadajuko! Vamos a correr!
 -"Cool! we are going to run!"

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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