473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 3086
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
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...
1
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...
2
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...
4
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...
1
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...
10
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...
2
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
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,...

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.