Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

help with option select box

Jul 22, 2005 12:38AM PDT

Hi,

I am very new to html (just learnt how to use html-kit) and wonder if anyone could help me resolve an issue.

I am trying to create a html page with 9 option select boxes, each populated by array of figures (1 to 9). What i would like to do but don't know how or if it is at all possible is make the page such that once a value is selected in the first option select box, then the other boxes are populated with values less the selected one. E.g. if 1 is selected in the first box, then the values shown in the second box will be 2 - 9 or if 2 is selected then other boxes are populated with values 1, and 3 - 9, and then this is repeated with the 2nd box and so forth.

Is this at all possible (it is certainly very complex to me). If possible how might i achieve this.

Thanks

Discussion is locked

- Collapse -
One Word
Jul 25, 2005 4:21AM PDT

Javascript.

I believe what you are trying to do is if you select one number in one box, then the other box will only display the other numbers. Not the one that was selected.

Now I don't know the exact syntax on this, but I do know that it is possible in javascript and as far as I know not HTML.

- Collapse -
any more info
Jul 29, 2005 11:26AM PDT

thnx xangelo.

Yes thats what i want. I found something similar on www.js-examples.com, however this only works such that you have to select first from the top row and the other rows are then populated, however i would like for it be such that each row initially has all the array values and the first selection can be from any row then the rest dynamically reload minus the selected value etc.

You say it is possible with javascript but not in html, whats the alternative, and could you suggest what syntax you know - it would be a good starting point.

- Collapse -
Javascript
Jul 29, 2005 12:27PM PDT

As far as I know, javascript would be the only way to do it.. As I said before I dont know the exact syntax, but I would be more than happy to help find it for you.

Stay Tuned Silly