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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:58:38+00:00 2026-06-07T00:58:38+00:00

I have this part of script from my GAE application which uses webapp2, which

  • 0

I have this part of script from my GAE application which uses webapp2, which accepts data from a form using post,

class RenderMarksheet(webapp2.RequestHandler):
   def post(self):
     regno = self.request.get('content')  # Here's where I extract the data from the form
     ...
     ...
     ...
     self.response.out.write(template.render(templates/render.html, template_values))

And the web form which posts to this script,

<form action="/sign" method="post" name="inputform" onsubmit="return validate()">
    Register No : <input type="number" name="regno" placeholder="Your Register No."/> 
                  <input type="submit" value="Get-My-GPA!" >
</form>

Now, I want to manually pass a specific data (a register no.), without using the submit button from the form, to the python script( or the url, perhaps) , using Javascript, say a button that triggers a javascript method.

I have to POST the data using javascript(to implement AJAX).
In python I do this, to post the data to a url,

import http.client, urllib.parse
params = urllib.parse.urlencode({'regno':10109104021})
headers = {"Content-type": "application/x-www-form-urlencoded",
       "Accept": "text/plain"}
conn = http.client.HTTPConnection("mydomain:8888")
conn.request("POST", "/sign", params, headers)
response = conn.getresponse()
print(response.status, response.reason)
data = response.read()

How can I post the data to the url, via Jquery or Javascript?

  • 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-07T00:58:40+00:00Added an answer on June 7, 2026 at 12:58 am

    fastest is to use jQuery and use $.post()

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

Sidebar

Related Questions

I have part of my script that goes like this: while read line do
i have this simple question please. I have this part of code which sets
We have this anonymous function in our code, which is part of the jQuery's
I use MS SQL Server 2000 SP4 and I have this part of script,
I have this action script that pulls images from a xml file > myPhoto
I have this script that is a part of a bigger one. I have
BEFORE CHAOS I used to have this one... at the head part <script type=text/javascript>$(function()
well im using this script right here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ and I have a multiMonth plugin
Currently I have a custom tool which generates vanilla-SQL (only using standard SQL), from
I have a cursor which works fine but when it gets to this part

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.