treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Dynamic drop down lists, which logic is more semantic?

  • I plan on making a series of dropdown lists for a user to select in the contact area. They will populate depending on what the first choice is. Should i:

    A.) Create all the elements (more mark-up) and hide and show them depending on the last selection?

    or

    B.) Use JS to dynamically create the selections for the user depending on the last selection?

    I can totally do both but wanted some feedback from you guys as to what would be more logical.

    And when i say dropdown list im referring to < select > < / select >

  • Check this out if you haven't: Dynamic Dropdown

    I personally followed the first method from the above link. Yeah, it turned out to be a bit lengthy because I had to do for 3 levels. But it was worth it because I had to store files under each of these lists.

  • @trollster, hey thanks for the link. Thats what i needed.