Guest User

Untitled

a guest
Oct 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. Table Studycourse:
  2. id, coursename, extension_of
  3.  
  4. 1, Law, 0
  5. 2, Economics, 0
  6. 3, Business Law, 1
  7. 4, Macro Economics, 2
  8.  
  9.  
  10. How can i populate a dropdownlist with option groups?
  11.  
  12. It should generate the following html:
  13.  
  14. <select name="studycourse" id="course">
  15. <optgroup label="Law">
  16. <option value="law-business">Business Law</option>
  17. </optgroup>
  18. <optgroup label="Economics">
  19. <option value="economics-macro">Macro Economics</option>
  20. </optgroup>
  21. </select>
Add Comment
Please, Sign In to add comment