Forum Moderators: open

Message Too Old, No Replies

Dependant radio boxes

         

Andrew Thomas

1:31 pm on Nov 10, 2003 (gmt 0)

10+ Year Member



I have a list of radio boxes. When one box is selected i want another list of radio boxes to appear below the first list. This list will be dependant on the first radio box selection.

It will be dynamic, i know what SQL is needed and how to insert the data, im just not sure on the structure required to perform the above task?

Any help appreciated.

aspdaddy

3:57 pm on Nov 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could do this with javascript by writing the new elements depending on the value selected, using onClick(). It would be pretty heavy (time consuming!) dom coding though and you would need to run all the possible SQL options first, maybe loading into javascript arrays.

Personally I would try to redesign the app if possible to page at a time, but thats just personal choice, there may be other ways of achieving it.

Andrew Thomas

9:07 am on Nov 11, 2003 (gmt 0)

10+ Year Member



Thanks, I decided last night to use different pages, much easier but not as effective, but never mind.

RossWal

5:02 pm on Nov 11, 2003 (gmt 0)

10+ Year Member



Another easy way to do it client side is to wrap it in a div and hide and display the div in the onClick events. Also, if the values of the radio buttons are changing maybe a select list would work better? They're easy to modify in javascript.

Good Luck,
Ross