Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

ajax django send array

from django.http import HttpResponse

def edit_lists(request):
    tasks = request.POST.getlist('tasks[]')
    return HttpResponse('Success')
Comment

ajax django send array

$('.btn-group').find('#mark_as_done').on('click', function() {
    var tasks = grab_selected();

    $.ajax({
        type: 'POST',
        url: '/edit_lists/',
        data: {'tasks[]': tasks},
    });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: csurf in express 
Javascript :: how to aadd variable in html tag in js 
Javascript :: sequelize findall 
Javascript :: vs code jsconfig 
Javascript :: how to update state in react 
Javascript :: postmark with nodejs 
Javascript :: good javascript ide 
Javascript :: pure component 
Javascript :: is checked jquery not working 
Javascript :: modify array elements javascript 
Javascript :: javascript export default 
Javascript :: js range similar to python 
Javascript :: The element.onclick Property 
Javascript :: foreach in the elements with a data attibute jquery 
Javascript :: javascript Create a RegEx 
Javascript :: js retrieve form data 
Javascript :: knex.raw postgres how to add multiple parameters 
Javascript :: como bugar o javascript 
Javascript :: properly print json in colab 
Javascript :: header react native 
Javascript :: copy js object 
Javascript :: click on browser.find_element_by_xpath with href 
Javascript :: formating decimal hours as hours and minute javascript 
Javascript :: react use media query 
Javascript :: angular javascript 
Javascript :: how to check if expo app is running on the web 
Javascript :: express send image bufffer 
Javascript :: js sleep function 
Javascript :: crear etiquetas html con javascript 
Javascript :: react popup 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =