I have a form that will collect input from the user and it consist of a button. Once a user click on the button, a pop up message will be shown.
I would like to post the form inputs to the url stated in the javascript.
<div class="live-preview">
<a class="confirm" id="alert">
<input type="submit" name="submit" class="btn btn-common uppercase" value="Edit Booking">
</a>
<script>
$(".confirm").easyedit();
$("#alert").click(function() {
window.location = "processEditBookSeat.php";
});
</script>
<input name="workshopSeatLeft" type="hidden" id="workshopSeatLeft" value="<?php echo $resultWorkshopDetail['workshopDetailSeatLeft']?>">
<input name="alreadyBookedSeat" type="hidden" id="alreadyBookedSeat" value="<?php echo $userBookedSeat?>">
<input name="workshopID" type="hidden" id="workshopID" value="<?php echo $getWorkshopID?>">
</div>
If you want to submit
the form using post to a specific adress and therefor direct to this address use
$('#form').attr('action', "/yoururl").submit();
If however you want to post it in the background use
$.post(url, $('#form').serialize());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With