Skip to content

Instantly share code, notes, and snippets.

@luckyruby
Created February 29, 2012 07:12
Show Gist options
  • Save luckyruby/1938783 to your computer and use it in GitHub Desktop.
Save luckyruby/1938783 to your computer and use it in GitHub Desktop.
$('#cartypes, #ratecodes').live 'change', ->
$('#rates_grid').trigger 'reloadGrid'
#set values of hidden inputs in form
location = $('#loc_select').val()
cartype = $('#cartypes').val()
ratecode = $('#ratecodes').val()
$('#location').val(location)
$('#cartype').val(cartype)
$('#ratecode').val(ratecode)
$("#loc_select").live 'change', ->
$.get '/rates/refresh_location', loc: $(this).val()
$ ->
#set values of hidden inputs in form
location = $('#loc_select').val()
cartype = $('#cartypes').val()
ratecode = $('#ratecodes').val()
$('#location').val(location)
$('#cartype').val(cartype)
$('#ratecode').val(ratecode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment