Guest User

Untitled

a guest
Feb 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. # the code #
  2. <%= select("employee", "company_id",
  3. @companies.collect {|c| [c.name, c.id]},
  4. html_options =
  5. {
  6. :onChange => "new Ajax.Update('dd_departments',
  7. '/action/department/company_changed/'+this[this.selectedIndex].value,
  8. {asynchronous:true, evalScripts:true});"
  9. }
  10. )
  11. %>
  12.  
  13. #the output #
  14. <span id="dd_companies">
  15. Company:
  16. <select id="employee_company_id" name="employee[company_id]"><option value="1">Geonerco Management Inc.</option>
  17. <option value="2">Alpine Homes, Inc.</option>
  18. <option value="3">Harbour Homes, Inc. (North)</option>
  19. <option value="4">Harbour Homes, Inc. (South)</option>
  20. <option value="5">Parkland Homes, Inc.</option>
  21. <option value="6">Riverside Homes, Inc.</option>
  22. <option value="7">Woodcrest Homes, Inc.</option>
  23.  
  24. <option value="8">GMN Farms, LLC</option>
  25. <option value="9">MV Dozer, LLC</option></select>
  26. </span>
Add Comment
Please, Sign In to add comment