Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8259969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:58:53+00:00 2026-06-08T02:58:53+00:00

hello i have the html code below <form> <input type=text id=filepathz size=40 placeholder=Spot your

  • 0

hello i have the html code below

<form>
<input type="text" id="filepathz" size="40" placeholder="Spot your project files">
<input type="button" id="spotButton" value="Spot">
</form>

the javascript code

  window.onload = init;

  function init() {
          var button = document.getElementById("spotButton");
          button.onclick = handleButtonClick;
  }       

  function handleButtonClick(e) {
          var filepathz = document.getElementById("filepathz");

         var path = filepathz.value;

         if (path == "") {
                 alert("give a filepath");
         }else{
                 var url = "http://localhost:5000/tx/checkme/filepathz=" + path;
                 window.open (url,'_self',false);
         }       
 } 

and the python code on flask

def index():
        """Load start page where you select your project folder
        or load history projects from local db"""
        from txclib import get_version
        txc_version = get_version()
        prj = project.Project(path_to_tx)

        # Let's create a resource list from our config file
        res_list = []
        prev_proj = ''
        for idx, res in enumerate(prj.get_resource_list()):
                hostname = prj.get_resource_host(res)
        username, password = prj.getset_host_credentials(hostname)
        return render_template('init.html', txc_version=txc_version, username=username)

    @app.route('/tx/checkme/<filepathz>')
    def checkme(filepathz):
            filepathz = request.args.get('filepathz')
            return render_template('init.html', txc_version=filepathz)

what am i doing wrong and can’t get the data from the form (filepathz) <— i get None

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:58:54+00:00Added an answer on June 8, 2026 at 2:58 am

    You’re not passing the variable correctly. There are two ways to pass the variable:

    1) Pass it via get method:

    http://localhost:5000/tx/checkme/?filepathz=" + path; (Note the '?')
    

    Currently you are trying to get the variable from request.args but not passing it in the request, that’s why you get none.

    2) Get it from the url with flask’s url structure:

    Do this in JS : http://localhost:5000/tx/checkme/" + path

    And in you view :

    @app.route('/tx/checkme/<filepathz>')
    def checkme(filepathz):
          return render_template('init.html', txc_version=filepathz) # You can use this variable directly since you got it as a function arguement.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have below code in html <div id=divTest> Hello <input type=text id=txtID/> <input type=text
I have below html code <div id=divTest> Hello <input type=text id=txtID value= /> <input
I have an HTML code as follows <body> Hello UserName:<input tyep=text/><br/> Pass:<input type=text/> </body>
I have run this Perl code: #!/usr/bin/perl print content-type: text/html \n\n; print Hello World.\n;
Hello i have the code below <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
lets say we have the code below: <html> <head> </head> <body> <p id=paragraph> <h1>HELLO</h1>
I have the HTML code below. I have set the body's width to 640px
Lets say I have the following code: <html> <body> <header> <h1> Hello World </h1>
Hello i have an HTML Code like this <div id=top> <div class=panel> <h1>toppanel</h1> <p>Content
Hello I want to have list of files in directory and a form below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.