aa
This commit is contained in:
@@ -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>
|
||||||
Reference in New Issue
Block a user