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

177
Views
how to import data from HTML Button from a server

I am working on a project where I need to import data from My website i.e when someone clicks a button then a string should be generated and I should import that string to a python script running on windows on a client-side. For this purpose Ive used Flask-Python but the problem is that In flask we need to create a template folder in the project folder where the python script is saved. but in my scenario, I need to run python script on windows and the template folder should be placed on the website page as I need to run HTML file on the webserver and import data from that file. I am facing this problem for a long time please someone help me.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can send the string to your route in flask. for example if you set your port in flask to 5000 so when you run it you can see in terminal the link to localhost lets say it looks like this http://195.128.1.18:5000/ and your route in flask looks like this :

@app.route('/')
def test():
    str = request.args.get('mystring', None)
    return str

and what it does it's basically shows the string you sent from html.
And your html code to send the data looks like this :

<body>
  <form target="_blank" action="http://195.128.1.18:5000/">
       Your String you want to send<input type="text" name="mystring">
       <input type="submit" value="Submit">
  </form>
</body>
about 4 years ago · Juan Pablo Isaza Report
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!