Skip to content

Commit

Permalink
fix: add listener for meter start on dom load
Browse files Browse the repository at this point in the history
  • Loading branch information
sgronlund committed Sep 26, 2024
1 parent 2ae2ea0 commit a30f697
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bocken/templates/journalentry_create.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ <h2 class="mt-2 text-4xl text-center">{% translate 'Previous entries' %}</h2>
document.querySelector("#nr-kilometers").innerHTML = value;
}
document.getElementById("id_vehicle").addEventListener("change", getSpecificVehicleValue);
document.addEventListener("DOMContentLoaded", getSpecificVehicleValue);
function getSpecificVehicleValue(){
// fetch primary key based on selection in option-element
const v_id = document.getElementById("id_vehicle").value;
Expand Down

0 comments on commit a30f697

Please sign in to comment.