skip to Main Content

Html – SvelteKit – Redirect after Form Submit

I have a problem with redirecting after submitting form in SvelteKit. I have some routes that needs authentication, before rendering it I'm checking if user is authenticated. routes │   ├── +page.svelte │   ├── login │   │   ├── +page.server.ts │   │  …

VIEW QUESTION

Javascript – sweetalert and form submit

I have a form and I want to trigger an alert (using sweetalert) on submit: <form id="verbale" class="verbale" action="editor_conferma.php" method="post"> ... <input id="go" type="submit" name="go" value="go" class="swa-confirm"> </form> <script> $(document).on("submit", ".swa-confirm", function (e) { e.preventDefault(); var $myForm = $('.verbale'); if…

VIEW QUESTION

Html – How do I submit a form with ajax

Trying to submit a form using ajax, but it's just not working $('#Submit').on('click',function(){ $.ajax({ type: 'get', url: 'ItemProcessor.php', data: $('#input_form').serialize(), success: function(response){ alert(response) }, error: function(){ alert('error') } }) event.preventDefault() }) <form id="input_form"> <input type="image" src="AddToCart.png" id="Submit"/> <input type="number" id…

VIEW QUESTION
Back To Top
Search