Re: Django AJAX forms and views

2012-05-16 Thread Joel Khan
Thanks. Actually I m using a lib called prototype where its returning the csrfmiddlewaretoken. I have tested the alert in my function and its returning the csrf token correctly. I m sending the color to the html page. I tried using both chrome and firefox with firebug and chrome doesnt do anything

Re: Django AJAX forms and views

2012-05-15 Thread Kurtis Mullins
I'll try to help out a bit. The first problem I see is in your Javascript. I believe your JQuery selector is supposed to be the field's ID -- so, for example, $("#csrfmiddlewaretoken"). Next, in your view -- I don't see where you're actually returning any data. You should use Firebug or the Chrome

Django AJAX forms and views

2012-05-15 Thread Joel Khan
I have a form that is used to add an item where 2 dropdowns are populated using different database than the database where the form will be submitted. I would like to add AJAX to the drop downs where selecting one item in the first drop down will auto populate data in the 2nd drop down using AJAX.