473,505 Members | 13,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use the Options tag in HTML (help needed asap!)

Hi everyone,

i have an assignment that needs immediate attention and was hoping i
would be able to get some help here.

im trying to create 3 option boxes that are linked together.

for example:

<Option Box 1> <Option Box 2> <Option Box 3>

General Information -----> Info 1.1 ---------> Next Info 1.1.1
-----> Info 1.2 ---------> Next Info 1.2.1

Contact Information -----> Info 2.1 ---------> Next Info 2.1.1
-----> Info 2.2 ---------> Next Info 2.2.1

from my limited HTML knowledge, i can only manage to link two of them
together using the simple code:

<select>
<option value="Info 1.1">General Information
<option value="Info 1.2">General Information
<option value="Info 2.1">Contact Information
<option value="Info 2.2">Contact Information
</select>

Please advise =_=
tony
Jul 23 '05 #1
3 2615
Tony Kim wrote:
i have an assignment that needs immediate attention and was hoping i
would be able to get some help here.

im trying to create 3 option boxes that are linked together.


Does your keyboard not have a shift key?

It seems you are asking for the option selected in one select element to
determine the options available to select in a second, and for the option
selected there to determine the options available in a third.

This is not possible in HTML. Select elements cannot be made interdependant.
You could make use of the optgroup element to group a number of options
together - but this only lets you go one level deep. (Future versions of
HTML (Ha!) may, according to the 4.01 specification allow nested optgroups,
but that is something for the distant future.

This leaves scripting. The safe way would be to have the user submit the
form, then display a different selection of options, and repeat as desired.
The unsafe way would be to use JavaScript to dynamically repopulate the
subsequent select elements when the onchange event of previous select
elements is triggered. You could combine the two methods so that the user
can submit the form to see new options if the JavaScript fails to work. If
you use JavaScript, you should probably consider defaulting subsequent
select elements to "DISABLED" (and remembering to reset 3 if 2 changes and
bother 2 and 3 if 1 changes).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2
Tony Kim wrote:
i have an assignment that needs immediate attention and was hoping i
would be able to get some help here.


Example:
http://examples.tobyinkster.co.uk/ch...ff/choosestuff

Pretty Highlighted Source Code:
http://examples.tobyinkster.co.uk/ch...hoosestuff-src

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #3
Tony Kim wrote:

i have an assignment that needs immediate attention and was hoping i
would be able to get some help here.

im trying to create 3 option boxes that are linked together.

Try "optgroup". It may help here. You can't style it much in Win-IE6
(you can in Firefox and others), but its default styling isn't too bad
either.

--
Google Blogoscoped
http://blog.outer-court.com
Jul 23 '05 #4

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

Similar topics

2
1398
by: SC | last post by:
I'm having a problem getting this validation script to work. There are two images on the page with the ids of img_antirobot and img_chk_agree. In the final page it will validate about 12 entries,...
0
976
by: Chris | last post by:
I have a security consultant group bashing Microsoft byt stating that the way IIS handles Session ID is flawed. They're asking me to, once my users hit the first asp page pre-authentication, to...
1
1603
by: lemes_m | last post by:
Hi All! I have very big problem and I can't continue my Work on my project until i solve it. Here is the situation: TblCalculations FldCalcId FldArticle FldQuantity FldPrice ...
0
1550
by: Pakmanoncrack | last post by:
The software company I work for creates 4 chm files from c# code with ndoc and then combines them into a fifth chm file by merging through html help. This is all done through a dos build and there...
2
3233
by: k1ckthem1dget | last post by:
I need to display the unsorted list of names and display the sorted list of names. My program is getting a bunch of errors though, and i dont know why. I am getting the following errors. 28:...
1
1199
by: sauravb | last post by:
hey everybody im a beginner at C++ and i really really might sound dumb but please help me.. al i need to do is display the map of india using borland in graphics mode....i've been searching fr...
1
2487
by: Miss Hyder | last post by:
hi everyone i really need help ...i bought a laptop with windows vista already installed now i hv installed vs.net 2003 n when i want to create asp web app/service it gives error that web server...
0
1003
by: canadianbacon | last post by:
Hi, I don't even know if this is the right place to post this but i will, because I need help. I'm trying to finish this basic game. but I am having troubles. If anyone wants to help me out it...
0
814
by: j4v3d | last post by:
hi i have a ASP.net website i created in VB i need to change a few things around and im getting errors, is there any one willing to help me? i can even pay you for your time if you want? need...
0
7213
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,...
0
7098
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
7366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7471
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
5610
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,...
0
3187
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...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
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 ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.