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>
This commit is contained in:
57
blitzkiste.net/js/dialog.js
Normal file
57
blitzkiste.net/js/dialog.js
Normal file
@@ -0,0 +1,57 @@
|
||||
$(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");
|
||||
Reference in New Issue
Block a user