Problem
I've combined three separate pieces of code i've been using and am having trouble closing the braces and parentheses. Looking at the code i suspect it may not be correct also, although i'm not entirely sure as still in the process of learning JavaScript.
$('#form1').submit(function(e) {
var currentForm = this;
e.preventDefault();
bootbox.confirm("Are you sure?", function(result) {
if (result) {
console.log('Form Submitted'); //Debug line
$.ajax({
type: 'POST',
url: 'indextest4.php',
data: $("#form1").serialize(),
error: function () {
console.log('Ajax Error');}, //Debug Line
success: function (response) {
console.log('Ajax Success'); //Debug Line
$('.fConfirm').css({
display:"inline",
height: 680,
width: 940
});
console.log("After CSS change");
}
});
});
Also if some kind soul could perhaps tell me a rule of thumb of how i could work out when you close using?
}
})
});