20 lines
523 B
JavaScript
20 lines
523 B
JavaScript
|
|
console.log("---------------inside image_editor.js--------------");
|
|
const edit_image_button = document.getElementById('edit_image');
|
|
const image_id_field = document.getElementById('image_id');
|
|
|
|
edit_image_button.addEventListener('click', () => {
|
|
const image_id = image_id_field.value;
|
|
|
|
PLGNTLS_ajax("postid", image_id, 'image_editor')
|
|
.then((response) => response.json())
|
|
.then((data) => {
|
|
console.log("data: ");
|
|
console.log(data);
|
|
})
|
|
.catch((error) => {
|
|
console.log("error: ");
|
|
console.log(error);
|
|
});
|
|
});
|