First of all I am getting in javascript the value of a field when selecting a row of a table like this:
$("#container tr").dblclick(function(){
$(this).addClass('selected').siblings().removeClass('selected');
var RutaId=$(this).find('.RutaId').html();
$("#RutaId").val(RutaId);
});
it works perfect because it takes the value I require but now I am incorporating in rails a method in the text field like this:
<%= text_field_tag :search, "", id:"RutaId", class:"", style: "", :'data-remote' => 'true', :'data-url' => url_for(:controller => 'reldaycli', :action => 'busqueda_vendedores_por_ruta', format: 'js') %>
that will look for records depending on the value, but it does not work When the value change with the code of javascript, only when I write in the field itself, how could I fix it?