I have this JS Code:
$('#submit').click(function() {
var res = confirm('You are about to add this Ticket Update with the following:\n\n' + $("textarea[name='ticket_update']").val() + '\n\n' + 'Time Start: ' + $("input[name='timestart_date']").val() + ' ' + $("input[name='timestart_time']").val() + '\n' + 'Time End: ' + $("input[name='timeend_date']").val() + ' ' + $("input[name='timeend_time']").val());
if(!res) {
return false;
}
else {
document.getElementById("ticket_update").submit();
}
});
which shows a popup box with form submitted data and if you click OK it will submit the form, otherwise cancel and go back to the form.
I want to be able to make it so: if OK is clicked on the confirm box, the form button will be disabled and the text value will change. Then the form will submit as normal
$
here, can we assume jQuery? If so, can you tag it additionally asjQuery
? – Benjamin Gruenbaum