Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #########################
  2. # Prior one with problem
  3. #########################
  4.  
  5. <%= select 'country', 'state',
  6. @states.blank? ? [['-- Empty --', '-1']] : @states,
  7. {}, :size => 1, :class => 'bodytext',
  8. :onChange => remote_function(:update => 'state_summary',
  9. :url => { :controller => 'states',
  10. :action => 'teaser' },
  11. :with => 'this') %>
  12.  
  13. #################
  14. # Correct one
  15. #################
  16.  
  17. <%= select 'country', 'state',
  18. @states.blank? ? [['-- Empty --', '-1']] : @states,
  19. {}, :size => 1, :class => 'bodytext',
  20. :onChange => remote_function(:update => 'state_summary',
  21. :url => { :controller => 'states',
  22. :action => 'teaser' },
  23. :with => "'id='+$F('country_state')") %>
Add Comment
Please, Sign In to add comment