Thanks, I tried to stay clear of posting code because I've tried maybe
20 different ways and nothing seems to work. I have used the {% url %}
tag and yesterday competed - a 'ajax_user_search' tut using django Q
still no luck. This was the load call:

$( document ).ready( function() {
    $( '#searchSubmit' ).click( function() {
        q = $( '#q' ).val();
        $( '#results' ).html( ' ' ).load(
                    '{% url userbase_user_search %}?q=' + q );
    });
});

Upon setting everything up and clicking the tag, nothing happens as
usual. I'm going to try the tut posted below with high hopes - and I
am considering trying 'djaxice'

On Apr 13, 3:39 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Friday, 13 April 2012 08:08:19 UTC+1, Eli_West wrote:
>
> > I've been attempting the most basic ajax call (.load()  )  through
> > django for over a month now - each time trying a different method or
> > tutorial none with success. Can someone post a working paradigm for
> > whatever django csrf, firefox, ect. workaround they use?
>
> > I can get jquery .load() to load content from an external file with
> > static files , no django. Same file served through django/templating
> > and the ajax is blocked. This is the general jquery call:
>
> > $(document).ready(function() {
> >     $('.list').click(function () {
> > $('#message').load('namesinfo.htm li');
> >         return false;
> >     });
> > });
>
> > To make things worse I found that Firefox/Chrome breaks Jquery's
> > sample 'Tabs: load content via ajax'  in the Themroller download. But
> > it works in IE :/. Same .load() calls occuring here. Just working w
> > static files no django. Could it be related to Firefox/Chrome?
>
> > I am pretty sure it is not: static file serving issues. I have heard
> > comments to follow django 'csrf / ajax' and included their sameOrgin
> > script to no avail. :
>
> >https://docs.djangoproject.com/en/dev/ref/contrib/csrf/
>
> > A similar issue even though this guys solution is hard to understand:
>
> >http://stackoverflow.com/questions/6643242/jquery-load-not-working-in...
>
> The argument to `load` is the URL you want to load. If you want that to be
> served by Django, you need to pass in a URL that's handled by your Django
> urls.py. 'namesinfo.htm' seems unlikely to be a Django url.
> --
> DR.

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