473,549 Members | 3,099 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic pull down menus (CGI)

Hi,

I have seen two entries in the archives for this topic:

1. Uses hypertext, not a pulldown menu to feed parameters back to the python
CGI
2. The other actually used Java.

Is there a way using Python for CGI such that when a user selects an item
from one pull down menu (ie FRUIT or VEGETABLE or MEAT) that another pull
down menu is filled with appropriate selections (If FRUIT in the first, then
APPLES, ORANGES etc... you get the idea)... without resorting to JavaScript?

Any references to RTxM are greatly appreciated...

Cheers
Keith
Jan 25 '06 #1
2 3092
You will be quite limited without the use of JavaScript to perform this
kind of dynamic functionality. HTML alone cannot do this. You can use
dynamically generated Javascript, AJAX, Flash or Java.

One possible would be to just use HTML forms and add in an extra button
click after the user makes their selection from the first select
element.

You could create the options for a select element using a CGI script
and contain the select element in a form. Position a submit button
beside the select element to submit the user's choice back to the
server.

A handling CGI script could then look at the value and recreate the
first select box and the second select box with the appropriate values.

Jan 25 '06 #2

js******@gmail. com wrote:
You will be quite limited without the use of JavaScript to perform this
kind of dynamic functionality. HTML alone cannot do this. You can use
dynamically generated Javascript, AJAX, Flash or Java.

One possible would be to just use HTML forms and add in an extra button
click after the user makes their selection from the first select
element.

You could create the options for a select element using a CGI script
and contain the select element in a form. Position a submit button
beside the select element to submit the user's choice back to the
server.

A handling CGI script could then look at the value and recreate the
first select box and the second select box with the appropriate values.


That's the only way I know of from pure HTML - make the top level a
link, which fetches a new page showing the sub-menu.

This means a full page reload for each toplevel menu. A little bit of
javascript in the page will remove that. You should find cut & paste
scripts fairly easily to do this. I believe there is even a Python
script to dynamically generate the javascript - I *think* from the guy
who wrote releaseforge...

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml

Jan 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11428
by: Sylvie Stone | last post by:
Hi group - I have an html form for that uses username and password to login to a specific area of the website. The "area" the user wants to go to is based on a pull down menu. Becasue the user/password info is in differnet databases, how can I call different validation scripts based on this input ? THANK YOU! See below please....
1
1603
by: Colvin | last post by:
I'm trying to create a pair of dynamic drop-down menus. I'm new to Javascript, so I tried to find a simple example on the web. I found a good example at http://javascript.about.com/library/weekly/aa072903a.htm , and I tried to model my problem after that. My attempt can be viewed at...
2
3759
by: Nick | last post by:
What I want to do is have 2 pull down lists, for example a state pull down list and a city pull down list. What I would like to have done is when you select a state from the state pull down list then the city pull down list will populate with all the cities from that selected state. I know that is a lot of data but that is just an example. Or...
4
13749
by: Alex Hunsley | last post by:
Can anyone recommend some code for creating drop-down menus in tkinter? To be absolutely clear, here's an example of a drop-down: http://www.google.co.uk/preferences?hl=en (see the language selection widget) I've found the odd bit of code here and there, such as:...
1
1677
by: dkimbrell | last post by:
Hi there, I'm very novice to web design. I'm trying to make a pulldown menu, but the formatting keeps getting screwed up when you roll the mouse over it. Please see www.boundarysys.com for what I'm talking about. Before the mouse touches the pulldown, the vertical height of the menubar is perfect. As soon as the mouse rolls over it, it...
10
4895
by: jflash | last post by:
Hello all, I feel dumb having to ask this question in the first place, but I just can not figure it out. I am wanting to set my site up using dynamic urls (I'm assuming that's what they're called, an example of what I have in mind is index.php?page=). However, I can not figure out how to do this. I will eventually want to use SEF urls, but...
2
2308
by: rpeterson84 | last post by:
Hello: I was hoping to gain some insight, a point in the right direction if you will... We use an .asp web page to select from a couple of dynamic drop down menus then enter a number, and press go to query the sql db. Is it possible to use a javascript to open the web page, and the select the options I want from a dynamic dropdown...
5
3977
by: giandeo | last post by:
Hello Experts. Could you find a solution for this problem please! I have the following tables in Access Database Table Name: origin Fields Names: country, countrycode Table Name: make Fields Names: countrycode, make
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7718
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6041
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1936
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.