Answer the question
In order to leave comments, you need to log in
How to send your data in js form without ajax?
There is a form submission handler code:
$('#kvm_vm_tab2 #form form').on('submit', function(e){
e.preventDefault();
var datastring = $(this).serialize();
$.ajax({
type: "GET",
url: "index.php",
data: datastring,
dataType: "json",
});
});
Answer the question
In order to leave comments, you need to log in
If you need to send a GET with a reload, you can add the necessary inputs to the form using jquery after processing the data, or send a GET using location.href after processing.
If you threw what is on jsfiddle.net and wrote step by step what should happen maybe you'll get an answer much faster
Actually, this line prevents the data from leaving the site:
e.preventDefault();
Remove it and submit, which is the default, will happen after your function completes.
And if you need to send not the data that was entered into the form - create a new form, put an input with the new data into it and make it submit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question