{"size": 1537, "ext": "js", "max_stars_repo_path": "js/selectajax.js", "max_stars_repo_name": "devmgalvan/punto-venta", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/selectajax.js", "max_issues_repo_name": "devmgalvan/punto-venta", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/selectajax.js", "max_forks_repo_name": "devmgalvan/punto-venta", "max_forks_repo_forks_event_min_datetime": "2020-06-16T17:12:58.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-16T17:12:58.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 24.3968253968, "max_line_length": 74, "alphanum_fraction": 0.5920624593}
	function llamdaselect (post,dato,select) {
		$.ajax({
			url: 'pages/ajaxprocesardatos.php',
			type: 'POST',
			data: {post : post, dato : dato},
		})
		.done(function(data) {
			select.html(data);
		})
		.fail(function() {
			console.log("error");
		})
		.always(function() {
			console.log("complete");
		});
		
	}

	//AUTOCOMPLETAR BUSQUEDA ARTICULOS DESDE FACTURA
	function auto(nomart) {
		if(nomart.length == 0) {
			// Hide the suggestion box.
			$('#auto').hide();
			
		} else {
			$.post("pages/auto_complete.php", {caja: ""+nomart+""}, function(data){
				if(data.length >0) {
					$('#auto').show();
					$('#autolist').html(data);
				}
			});
			
		}
	} // lookup
	
	function fin(thisValue) {
		$('#nomart').val(thisValue);
		setTimeout("$('#auto').hide();", 200);
	}  //FIN

	$("select[name='categorias']").change(function(){
		var dato = $("select[name='categorias'] option:selected").val();
		var post = 'categoria';
		var select = $("select[name='subcategorias']").val("");
		llamdaselect(post,dato,select);
		//alert(dato);		
	});

	$("select[name='estado']").change(function(event) {
		var dato = $("select[name='estado'] option:selected").val();
		var post = 'estado';
		var select = $("select[name='municipio']");
		llamdaselect(post,dato,select);
		//alert(dato);
	});

	$("select[name='municipio']").change(function(event) {
		var dato = $("select[name='municipio'] option:selected").val();
		var post = 'ciudad';
		var select = $("select[name='lugar']");
		llamdaselect(post,dato,select);
		//alert(dato);
	});