Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # the code #
- <%= select("employee", "company_id",
- @companies.collect {|c| [c.name, c.id]},
- html_options =
- {
- :onChange => "new Ajax.Update('dd_departments',
- '/action/department/company_changed/'+this[this.selectedIndex].value,
- {asynchronous:true, evalScripts:true});"
- }
- )
- %>
- #the output #
- <span id="dd_companies">
- Company:
- <select id="employee_company_id" name="employee[company_id]"><option value="1">Geonerco Management Inc.</option>
- <option value="2">Alpine Homes, Inc.</option>
- <option value="3">Harbour Homes, Inc. (North)</option>
- <option value="4">Harbour Homes, Inc. (South)</option>
- <option value="5">Parkland Homes, Inc.</option>
- <option value="6">Riverside Homes, Inc.</option>
- <option value="7">Woodcrest Homes, Inc.</option>
- <option value="8">GMN Farms, LLC</option>
- <option value="9">MV Dozer, LLC</option></select>
- </span>
Add Comment
Please, Sign In to add comment