aa
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Link Page</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Links</h1>
|
||||
<form method="GET" action="{{ route('handleArticleActionPao') }}">
|
||||
<form id="articleForm">
|
||||
<label for="article_id">Inserisci l'ID dell'articolo:</label>
|
||||
<input type="text" id="article_id" name="id" />
|
||||
<select name="action">
|
||||
@@ -16,5 +18,25 @@
|
||||
</select>
|
||||
<button type="submit">Esegui Azione</button>
|
||||
</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>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user