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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:44:40+00:00 2026-05-23T14:44:40+00:00

I have been working on getting a python CGI script to work all day,

  • 0

I have been working on getting a python CGI script to work all day, and I am now at near the final hurdle, but I have run into a problem that I cant seem to find an answer for…

Its in 2 parts so here goes:

I am generating the following html code:

 <form action="selections.cgi" enctype="multipart/form-data" method="POST">
   <input type="hidden" name="captureSelection"/>
   <select name="cboOptions">
   <option value="1">Option 1</option>
   <option value="2">Option 2</option>
   <option value="3">Option 3</option>
   <option value="4">Option 4</option>
   <option value="5">Option 5</option>
   <option value="6">Option 6</option>
   </select>
   </form>

Note: apologies I am unable to get the HTML into a code block..

This html code creates a form that only has a combo box in it. What I want is to be able to get the user to select an item from the combo box and for the script to be run. Is it possible WITHOUT using javascript to be able to get the selection to submit, like the input submit button does in regular forms? Or is a button needed to capture the input, if im not using javascript?

Now for the second part:

I am using the hidden field in the example above to make sure I call the correct function in my CGI/PYTHON script and so far that works. But I haven’t been able get the value from the selected option back from the form, and I havent been able to find an code references online written in PYTHON that will allow me to get the value of the selected option.

Is this possible and how is it done, if you have a link to an example that would be better…

  • 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-05-23T14:44:40+00:00Added an answer on May 23, 2026 at 2:44 pm

    If you want the form to automatically submit whenever the user changes the option then javascript is mandatory. It would be very simple:

    <select name="cboOptions" onchange="this.form.submit();">
    

    I suspect that what is preventing you from reading the selected value is the enctype atribute. Just take it out:

     <form action="selections.cgi" method="POST">
    

    If that does not work post the part of the code handling the selected value.

    This tutorial will show you how to handle forms:

    http://webpython.codepoint.net/cgi_form

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

Sidebar

Related Questions

I have been working on a project in scala, but I am getting some
I have been working with relational databases for sometime, but it only recently occurred
I have been working as a native C++ programmer for last few years. Now
I have been working with Struts for some time, but for a project I
I have been working on getting a basic ATL project to compile in Visual
I have been working Quartz framework in my grails project with lib called quartz-all-1.7.3.
I have been working on an iPhone App for a couple of weeks now
I've been working with the PHP api for google Calendar, and have been getting
I have been working on an app for a couple weeks now, using GoDaddy,
Been trying to figure this one out all day. I have a large text

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.