Как проверить форму, а затем передать значения на страницу благодарности и отобразить страницу благодарности - PullRequest
0 голосов
/ 03 августа 2020

Мне нужно проверить эту форму и отправить значения на новую страницу и отобразить новую страницу со значениями. Проверка формы работает, и статус сети показывает 200, но новая страница signmeuptemp2 / не загружается и никаких ошибок не отображается. выяснить, почему signmeuptemp2 / не загружается и не отображает значения.

<script type = "text/javascript" >
    function submitted() {
        theButton = document.getElementById("submitbutton");
        theButton.disabled = "disabled";
        theButton.value = "Please Wait...";
} 
</script>

<div id = "progress">Please wait... </div></div></div>

<!-- Bootstrap validator -->
<script type = "text/javascript">
    $(document).ready(function () {
        $('#register-form').bootstrapValidator({
            container: '#messages',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                password: {
                    validators: {
                        notEmpty: {
                            message: '<p>first password isrequired'
                        },
                        stringLength: {
                            min: 4,
                            max: 30,
                            message: 'Your  password must be more than 4 and less than 10 characters long111111111'
                        }
                    }
                },

                passwordchek: {
                    validators: {
                        identical: {
                            field: 'password',
                            message: 'Both passwords must match!'
                        },
                        notEmpty: {
                            message: '<p>second password isrequired'
                        },
                        stringLength: {
                            min: 4,
                            max: 30,
                            message: '<p>Your  password must be more than 4 and less than 10 characters long'
                        }
                    }
                },
                captchaa: {
                    validators: {
                        notEmpty: {
                            message: '<p>code is required'
                        },
                        stringLength: {
                            min: 4,
                            max: 30,
                            message: '<p>the code must be more than 4 and less than 10 characters long'
                        },
                    }
                },
            },

            // https://stackoverflow.com/questions/46356529/firefox-displaying-form-data-in-url-upon-jquery-ajax-post
            submitHandler: function (form) {
                $.ajax({
                    type: 'POST',
                    cache: 'false',
                    url: 'signmeuptemp2/',
                    data: $("#register-form").serialize(),
                    success: function (data, status) {
                        alert(data);
                    }
                });
            }
        });
    }); 
</script>
<script type = "text/javascript" language = "JAVASCRIPT" src = "//cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.4.5/js/bootstrapvalidator.min.js"></script>
 
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...