if (!('jQuery' in window) || jQuery.fn.jquery < "1.11.3"){ throw new Error("Please make sure that jQuery is enabled on this page! (At least jQuery 1.11.3)"); } jQuery(function(){ var options = {"query":{"uid":"5e44da4f-3ec6-4fa7-9889-cb5f92830e54"},"targetElementSelector":"#wirklich-digital-form","formRequestUrl":"https:\/\/portal.serviceportal-shk.de\/de\/zvshk-portal\/api\/form-generator\/render"}; function throwError(msg) { if(!!options.notify_user) { jQuery(options.targetElementSelector).each(function() { jQuery(this).text("Form loading failed: " + msg); }); } throw new Error("Script execution failed: " + msg); } if(options.error_message) { throwError(options.error_message); } if(!options.query) { throwError("No query data set!"); } try { jQuery.ajax({ url: options.formRequestUrl, data: options.query, type: 'POST', }).done(function(html) { jQuery(options.targetElementSelector).each(function() { jQuery(this).html(html); }); }).fail(function(errObj) { throwError("Form request failed!"); }); } catch (ex) { throwError("Form request failed!"); } });