test3
This commit is contained in:
@@ -75,33 +75,8 @@ Timbres disponibles Comercio Digital: {{saldo}}
|
||||
<th>Estado</th>
|
||||
<th scope="col">
|
||||
<a target="_blank" rel="noopener noreferrer" href="{% url 'export_Excel' %}?mes={{mes}}&year={{year}}">Excel Todos los clientes X Mes </a> <br>
|
||||
|
||||
|
||||
<a target="_blank" rel="noopener noreferrer" id="target_fill" href="">Excel Todos los clientes X Mes params</a>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// Seleccionar los elementos
|
||||
const pacSelect = document.getElementById("table_select_PAC");
|
||||
const anioSelect = document.getElementById("table_select_anio");
|
||||
const mesSelect = document.getElementById("table_select");
|
||||
const targetLink = document.getElementById("target_fill");
|
||||
|
||||
// Función para actualizar el href
|
||||
function updateLinkHref() {
|
||||
const pacValue = pacSelect.value;
|
||||
const anioValue = anioSelect.value;
|
||||
const mesValue = mesSelect.value;
|
||||
|
||||
// Actualizar el href del enlace
|
||||
|
||||
targetLink.href = `https://aduanasoft.pythonanywhere.com/get_timbres_xls/?${pacValue}_${anioValue}_${mesValue}`;
|
||||
}
|
||||
|
||||
// Agregar eventos de cambio
|
||||
pacSelect.addEventListener("change", updateLinkHref);
|
||||
anioSelect.addEventListener("change", updateLinkHref);
|
||||
mesSelect.addEventListener("change", updateLinkHref);
|
||||
});
|
||||
</script>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user