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 8758197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:29:02+00:00 2026-06-13T14:29:02+00:00

I have one test.html: <form action=/cgi-bin/test.py method=GET> <input type=text name=search> <input type=submit value=Submit> </form>

  • 0

I have one test.html:

<form action="/cgi-bin/test.py" method="GET">
<input type="text" name="search">
<input type="submit" value="Submit">
</form>
<div id="res"></res>

And one python script test.py:

#....
print Result
#....

I want instead of printing result on the test.py, return it to the test.html and write it in the div with id res… How I can do that?

  • 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-13T14:29:03+00:00Added an answer on June 13, 2026 at 2:29 pm
    <form id="myform">
    <input id="my_text">
    <button id="submit_btn">
    </form>
    <div id="result">
    </div>
    <script>
    //you need to use jquery for this part
    $("#submit_btn").click( function() {
        $("#result").load("/path/to/cgi?my_text="+$("#my_text").val())
    })
    </script>
    

    something like that… (this is real hacky 1 minute post that is untested so it may need some work …

    your question really has nothing to do with python … it is just web technology question … it would be the same if it was a php or C# or whatever processing the form data

    it has nothing to do with python because it doesnt matter how you are processing the form data … this is just web technology it would work exactly the same with a perl script instead of a python script or with a C# instead of python or whatever … you want to return some data back to a web page … how you got the data is really not relevant

    <html>
    <head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    </head>
    <body>
    <form action="someother.html" method="get">
    <input id="my_text">
    <input type="button" id="my_button" value="click me">
    </form>
    <div id="result">
    
    </div>
    <script>
    $("#my_button").click(function(){
         $("#result").load("");
    })
    </script>
    </body>
    </html>
    

    here is an example … just paste it into a file.html and go to it and click the button …
    its just loading its self load("") so it should duplicate the data thats on the page when you click it …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html <form action=http://www.test.com method=post name=form_test target= > <input type=image src=loader.gif
i have a php code like this <html> <body> <center> <FORM action= method=post> <input
I have three files in a folder 'test' one.php two.php print.html And i have
I have one test wcf service with default methods and web config is :
Normally I would have one junit test that shows up in my integration server
I have my new macbook air. I have created one test application. now i
I work with Oracle 11g. I have one table: create table test (one number(2),
I have one file (for example: test.txt), this file contains some lines and for
I have one application that prints messages from Test.exe in console .My java program
I have one project inside that I have SqlServerFunctions in test.cs file. code: [Microsoft.SqlServer.Server.SqlFunction]

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.