Hallo Leute ich habe hier ein kleiner Problem das nicht direkt mit Contao zu tun hat.
Ich bin nicht der JS Profi und frage mich warum es nicht geht.

Ich will ein Modal nach 3 Sekunden anzeigen lassen in diesem ist ein Formular von Rapidmail indem sich die User eintragen sollen.
Das Formular für sich funktioniert und hat keine Fehler. Aber sobald ich das in das Bootstrap-Modal einbaue und es abschicke kommt nichts bei Rapidmail an.

Meine Vermutung ist das durch das schließen des Modals beim absenden auch der Sendevorgang abbricht. Wie kann ich das verhindern?

Hier der Quellcode:

HTML-Code:
    <div class="modal fade" tabindex="-1" id="myModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <form action="https://t4df46adf.emailsys1a.net/161/1149/0957c720b4/subscribe/form.html" method="post" class="form-horizontal" id="rapidnewsletter">
                    <input type="text" class="hidden" name="f_1eTZz-JRtzb-3Wxk6x3" value="" tabindex="-1" />
                    <input type="hidden" class="hidden" name="url_ok" value="https://www.moebro.de/Newsletter-danke" />
                    <input type="hidden" class="hidden" name="url_error" value="https://www.moebro.de/Newsletter-Fehler" />
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title text-center">Newsletteranmeldung und 10€ geschenkt</h4>
                    </div>
                    <div class="modal-body">
                        <div class="row form-group form-group-lg">
                            <div class="col-sm-12">
                                <img class="img-responsive img-rounded img-thumbnail" src="//www.moebro.de/mediafiles/Bilder/Newsletter/Newsletter.jpg" alt="Newsletteranmeldung" />
                            </div>
                        </div>
                        <div class="row form-group form-group-lg">
                            <div class="col-sm-2">
                                <label class="control-label text-center" for="email">E-Mail:</label>
                            </div>
                            <div class="col-sm-10">
                                <input type="text" class="input-lg form-control" name="email" id="email" value="" />
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-default btn-xs pull-left nothanks" data-dismiss="modal" aria-hidden="true">Nicht mehr anzeigen</button>
                        <input  class="btn btn-success pull-right nothanks form_button_submit" data-dismiss="modal" aria-hidden="true" type="submit" value="Am Newsletter anmelden" />
                    </div>
                </form>
            </div>
        </div>
    </div>

{literal}
    <!-- Cookie JS for Modal -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.0/jquery.cookie.min.js"></script>
    <script>
        // Delayed Modal Display + Cookie On Click
        $(document).ready(function() {

            // If no cookie with our chosen name (e.g. no_thanks)...
            if ($.cookie("no_thanks") == null) {

                // Show the modal, with delay func.
                $('#myModal').appendTo("body");
                function show_modal(){
                    $('#myModal').modal();
                }

                // Set delay func. time in milliseconds
                window.setTimeout(show_modal, 3000);
                }

            // On click of specified class (e.g. 'nothanks'), trigger cookie, with expiration in year 9999
            $(".nothanks").click(function() {
                document.cookie = "no_thanks=true; expires=Fri, 31 Dec 9999 23:59:59 UTC";

            });
        });
    </script>
{/literal}