lollms-webui/static/js/training.js

15 lines
433 B
JavaScript
Raw Normal View History

2023-04-11 23:34:50 +00:00
document.getElementById('training-link').addEventListener('click', loadHelpPage);
2023-04-11 23:07:54 +00:00
function loadHelpPage(event) {
event.preventDefault(); // Prevent the default link behavior
2023-04-11 23:34:50 +00:00
fetch('/training')
2023-04-11 23:07:54 +00:00
.then(response => response.text())
.then(html => {
2023-04-11 23:34:50 +00:00
document.getElementById('training').innerHTML = html;
2023-04-11 23:07:54 +00:00
})
.catch(error => {
console.error('Error loading help page:', error);
});
}