Guest User

Untitled

a guest
Feb 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. # this should call a new web page to be inserted into div#base_list
  2. # it currently does nothing.
  3. # I think the problem may be the observe_field below
  4. # thoughts?
  5.  
  6. <%= form_tag :action => :goto_service %>
  7. <%= javascript_include_tag "prototype" %>
  8. <div id="branch">
  9. <select id="branch" name="branch" >
  10. <option value="" selected="selected">Select a Branch</option>
  11. <option value="AF">Air Force</option>
  12. <option value="Army">Army</option>
  13. <option value="CoastGuard">Coast Guard</option>
  14. <option value="Marines">Marines</option>
  15. <option value="Navy">Navy</option>
  16. </select>
  17. </div>
  18.  
  19. <div id="base_list">
  20. </div>
  21.  
  22. <div id="service_id_list">
  23. </div>
  24.  
  25. <%= observe_field("branch",
  26. :frequency => 0.25,
  27. :update => "base_list",
  28. :url => {:action => :update_bases},
  29. :with => "'service='+value")
  30. %>
  31.  
  32. <%= end_form_tag %>
Add Comment
Please, Sign In to add comment