Files
web-development/blitzkiste.net/js/dialog.js
Felix Zösch 07c290a453 Initial commit: Backup der Webseiten
- zoesch.de
- blitzkiste.net
- gruene-hassberge (norbert.zoesch.de)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-13 01:17:15 +01:00

58 lines
1.3 KiB
JavaScript

$(document).ready(function() {
// Variable to hold request
var request;
// recaptcha
var isHuman = grecaptcha.getResponse();
// Bind to the submit event of our form
$("#contact_form").submit(function(event){
// Abort any pending request
if (request) {
request.abort();
}
// setup some local variables
var $form = $(this);
// Let's select and cache all the fields
var $inputs = $form.find("input, textarea");
// Serialize the data in the form
var serializedData = $form.serialize();
// Fire off the request to /form.php
request = $.ajax({
url: "/contact.php",
type: "post",
data: {serializedData:serializedData, isHuman:isHuman},
success: function(data){
$('#dialog').html(data);
$('#dialog').dialog({
dialogClass: "contact-dialog",
height: 200,
width: 350,
resizable: false,
draggable: false,
modal: true,
show: { effect: "clip", direction: "vertical", duration: 600},
hide: { effect: "clip", direction: "vertical", duration: 600 },
title: "KONTAKT",
buttons: { "OK": function() {
$( this ).dialog( "close" );
}
}
});
}
});
// Prevent default posting of form
event.preventDefault();
});
});
//$("#dialog").dialog("option", "title", "Loading...").dialog("open");