Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

266
Views
How to pass array from javascript using ajax to flask

jquery code

 $(document).ready(function(){        
        $('#submit').click(function(){
            // var From = $('#STN_CODE').find(":selected").val();
            
            if(unique.length !=0)
            {
                $.ajax({
                    url:"/2pointentry",
                    method:"POST",
                    data:{new_data:unique},
                    success:function(data)
                    {
                        $('#change').html(data);
                        $('#change').append(data.htmlresponse);
                    }
                });
            }
            else
            {
                alert("Please provide the defficiences noted");
            }
        });
    });

python code

def add_point2(): if request.method == "POST": print(request.form("new_data")) return render_template("newpoints2.html",form =form,name = name,details=record)

please tell me how can i pass the array named as unique in javascript to flask using ajax

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!