This commit is contained in:
paoloar77
2024-05-20 23:22:38 +02:00
parent 0b788c21b5
commit 4e95f7fef1

View File

@@ -1,13 +1,15 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Link Page</title> <title>Link Page</title>
</head> </head>
<body> <body>
<h1>Links</h1> <h1>Links</h1>
<form method="GET" action="{{ route('handleArticleActionPao') }}"> <form id="articleForm">
<label for="article_id">Inserisci l'ID dell'articolo:</label> <label for="article_id">Inserisci l'ID dell'articolo:</label>
<input type="text" id="article_id" name="id" /> <input type="text" id="article_id" name="id" />
<select name="action"> <select name="action">
@@ -16,5 +18,25 @@
</select> </select>
<button type="submit">Esegui Azione</button> <button type="submit">Esegui Azione</button>
</form> </form>
<div id="result"></div>
<script>
document.getElementById('articleForm').addEventListener('submit', function(event) {
event.preventDefault();
let formData = new FormData(this);
fetch('{{ route('
handleArticleActionPao ') }}', {
method: 'GET',
body: formData
})
.then(response => response.text())
.then(data => {
document.getElementById('result').innerHTML = data;
});
});
</script>
</body> </body>
</html>
</html>