Hola buen dia
Tengo 3 list box uno llamado region, otro pais y otro lugar, el de region, muestra los continentes del mundo, el segundo los paises dependiendo del continente y lugares dependiendo del pais, el problema que tengo es que cuando eligo otra opcion y quiero volver a filtrar aparecen lugares que ya habia borrado, pero vuelvo a elegir continente o pais y de nuevo el pais elegido primeramente, y ya no aparecen, osea que hago un refresh manual
Quiero preguntar si es posible que este refresh se haga de manerea automatica
Código:
capturefor (javascript)
<script type="text/javascript">/*<![CDATA[*/
$(document).ready(function() {
$('select#dashboard_Location_Region_Id').change(function() {
var selector = 'select#SubRegion_Id';
var url = siteURL + '/system/location/GetSubRegionByRegion.ashx';
var url_params = { id: $(this).val() };
GetJSONSelectOptions(url, url_params, selector, 'Id', 'Name');
CleanSelectOptions('select#SubRegion_Id');
GetCountriesByRegion($(this).val());
});
$('select#SubRegion_Id').change(function() {
var selector = 'select#dashboard_Location_Country_Id';
var url = siteURL + '/system/location/GetCountryBySubRegion.ashx';
var url_params = { id: $(this).val(), region_id: $('select#dashboard_Location_Region_Id').val() };
GetJSONSelectOptions(url, url_params, selector, 'Id', 'Name');
CleanSelectOptions('select#dashboard_Location_Country_Id');
$('select#entity_Location_Country_Id option:empty').remove();
});
$('select#dashboard_Location_Country_Id').change(function() {
var rel = $(this).attr('rel');
var relSelector = HTMLRelSelector(rel);
var selector = 'select#dashboard_Location_Site_Id' + relSelector;
var url = siteURL + '/system/location/GetSitesByCountry.ashx';
var url_params = { id: $('select#dashboard_Location_Country_Id' + relSelector).val() };
GetJSONSelectOptions(url, url_params, selector, 'Id', 'Name');
CleanSelectOptions('select#dashboard_Location_Site_Id');
$('select#entity_Location_Site_Id option:empty').remove();
});
});
function GetCountriesByRegion(region_id)
{
var selector = 'select#dashboard_Location_Country_Id';
var url = siteURL + '/system/location/GetCountriesByRegion.ashx';
var url_params = { id: region_id };
GetJSONSelectOptions(url, url_params, selector, 'Id', 'Name');
CleanSelectOptions('select#dashboard_Location_Site_Id');
$('select#entity_Location_Site_Id option:empty').remove();
CleanSelectOptions('select#Region_Id');
CleanSelectOptions('select#dashboard_Location_Country_Id');
CleanSelectOptions('select#dashboard_Location_Site_Id');
$('select#entity_Location_Site_Id option:empty').remove();
}
/*]]>*/</script>
#end
#blockcomponent (Page with "pagetitle=Checklist by Location: Completeness Percentage $title")
#mainbuttonsbar
$ButtonHelper.ExportToExcel()
$ButtonHelper.MailTo()
$ButtonHelper.SaveReport()
#end
#filter
#blockcomponent (Filter with "action=list" "method=get")
#if (!$filterOwnLocationOnly)
les envio parte del codigo por si me pueden ayudar
gracias