I have a button below. When I press it, my form data is displaying in my URL like so:
?name=&email=&phone=&message=
I dont want that and im unsure of why its there considering there is no POST on my form and my button is using a jquery post method.
Heres the form and button in question:
<form class="form">
<p type="Message"><input type="text" name="message"></p>
<button id="clickMe">Send Message</button>
</form>
Heres the jquery on my button:
$(document).ready(function() {
$('#clickMe').on('click', function() {
var data = {};
data.name="kevin";
$.ajax({
type: "POST",
data: JSON.stringify(data),
contentType: 'application/json'
});
});
});