Commit 64369541 authored by Mat's avatar Mat

la requête getAJAX lorsqu'on clique sur le bouton ->

attention chez moi le paramètre s'appelle 'id', cfr routing
parent e11d5979
......@@ -102,9 +102,9 @@
editBtn.innerHTML = '<i class="fas fa-edit fa-fw"></i> Editer';
editBtn.classList.add('btn', 'btn-primary');
editBtn.addEventListener('click', function() {
console.log(this);
console.log(this.dataset.ownerId);
// toujours dataset pour travailler sur les attr data-*
let ownerId = this.dataset.ownerId;
console.log(ownerId);
getAJAX(Routing.generate('api_owner_read_one', {'id': ownerId}));
});
td4. appendChild(editBtn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment