Guest User

Untitled

a guest
Jun 20th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. ** in javascript file
  2. function onTypeChange()
  3. {
  4. alert($('type_id').selectedIndex);
  5. if ($('type_id').selectedIndex != 0)
  6. {
  7. Element.update('chosenType', this.options[this.selectedIndex].text);
  8. Form.Element.enable('go_button');
  9. } else {
  10. Element.update('chosenType', 'Selected Type');
  11. Form.Element.disable('go_button');
  12. }
  13. }
  14.  
  15. ** in html
  16. <select class="hosp_select_buttons selectbox" id="type_id" name="type[id]"
  17. onchange="onTypeChange();">
  18. <option value="">Please select</option>
  19. <option value="1594">Ambulatory Surgical Center</option>
  20. <option value="1595">Birthing Center</option>
  21. <option value="1596">Comprehensive Outpatient Rehabilitation Facilities</option>
  22. <option value="1597">Drug Abuse Treatment Program</option>
  23. <option value="1598">Mammography</option>
  24. <option value="1599">Narcotic Treatment Program</option>
  25. <option value="1600">Outpatient Physical Therapy</option>
  26. <option value="1601">Private Home Care Provider</option></select>
Add Comment
Please, Sign In to add comment