WDV321 Advanced JavaScript
Dynamic Content - Drop Down Lists
The goals of this assignment:
- Demonstrate how to dynamically populate a select element using the
document.write()technique - Demonstrate how to dynamically populate a select element using the
createElement()technique - Demonstrate how to dynamically add an option to a select element
- Demonstrate how to dynamically change the options of a select element
Team Names
Team Name:
Instructions (implemented):
- Uses
document.write()and theteamNamesarray to populate the select. - On selection, displays the chosen team next to “Team Name:”.
- “Add Team Name” appends the typed value to the select.
- “Reset” restores original values.
Cookies or Candy?
Selected Product:
Instructions (implemented):
- Uses the
createElement()technique +cookiesarray to populateproductDisplay. - On selection, displays the product next to “Selected Product:”.
- Radio buttons switch the select’s contents between cookies and candy.
- “Reset” (on the left) also restores this panel to its original state.