Changeset b14db79 in sicp
- Timestamp:
- Jun 11, 2015, 12:10:32 PM (9 years ago)
- Branches:
- master
- Children:
- 59320a5
- Parents:
- f8ea66d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
static/js/funciones.js
raca0dad rb14db79 124 124 if (tipo=="ue") { 125 125 /** Requerimientos de divisas por Unidad Económica */ 126 126 get_params = {rif: id}; 127 127 } 128 128 else if (tipo=="pr") { 129 129 /** Requerimientos de divisas por producto */ 130 get_params = {pr_id: id}; 130 131 } 131 132 … … 193 194 $(modal).find('[data-toggle="tooltip"]').tooltip({}); 194 195 $(modal).find('.select2').select2({}); 196 197 $.getJSON(URL_ANHOS_PRODUCTOS, get_params, function(datos) { 198 if (datos.resultado) { 199 for (i=0; i<datos.anhos.length; i++) { 200 $(modal).find("#anhoregistro").append("<option value='"+datos.anhos[i]+"'>"+datos.anhos[i]+"</option>"); 201 } 202 } 203 else { 204 bootbox.alert(datos.error); 205 } 206 }).fail(function(jqxhr, textStatus, error) { 207 var err = textStatus + ", " + error; 208 209 bootbox.alert(ERROR_AJAX_REQUEST + err); 210 }); 195 211 } 196 212 … … 286 302 $(modal).find('[data-toggle="tooltip"]').tooltip({}); 287 303 $(modal).find('.select2').select2({}); 288 } 304 305 // Instrucción AJAX que permite obtener los años de registro del producto seleccionado 306 $.getJSON(URL_ANHOS_PRODUCTOS, {pr_id:id}, function(datos) { 307 if (datos.resultado) { 308 for (i=0; i<datos.anhos.length; i++) { 309 $(modal).find("#anhoregistro").append("<option value='"+datos.anhos[i]+"'>"+datos.anhos[i]+"</option>"); 310 } 311 } 312 else { 313 bootbox.alert(datos.error); 314 } 315 }).fail(function(jqxhr, textStatus, error) { 316 var err = textStatus + ", " + error; 317 318 bootbox.alert(ERROR_AJAX_REQUEST + err); 319 }); 320 }
Note: See TracChangeset
for help on using the changeset viewer.