So I have a local site that runs and posts forms to my web server, however I want a feedback on the form that tells the person using the form something.
For Example if someone signed in and then as they were signing out it would tell them what time they signed in:
<form action="http://www.example.com/signout.php" method="post" name="signoutForm">
<input type="text" name="firstname" id="ofname" autocomplete="off" required><br>
<div id="feedback"></div>
<input type="submit">
</form>
<script>
$('#ofname').keyup(function() {
//ofname is the two id for the check signout; o for out
$.post('http://www.example.com/checksignout.php', {
firstname: document.signoutForm.firstname.value
},
function(result) {
$("#feedback").html(result);
}
});
</scipt>
But I guess jquery can't do like cross domain requests? Is there a way around this?