Send data from multiselect fied to flask python

sdotone

New Member
I am using html+ajax+python flaks framework. Now i need to post some data to server. Here is my code\[code\] $('#stopcontainer').submit(function(){ id = id var selectednumbers = $('#service').val() var extra = document.getElementById('More').value $.ajax({ type: 'post', url: "/stop/"+id, cache:false, async:true, data: { id: id, services: selectednumbers, extra: extra }, success: function(data) { alert(data) }, error: function(data) { alert("Error") } }); return false\[/code\]}); });I was trying to access the data like the following\[code\] service = request.form.get('services') extra = request.form.get('extra')\[/code\]But it is showing None. Can anybody help
 
Back
Top