Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

101
Visualizações
Document.location.assign not working in iphone devices and ordinary browsers

I have written a code for the sucess page after submitting the quote. It only worked for a number of times after that the page is redirecting to homepage of the website . I'm attaching the code for the particular page, could you please check and let me know what is the issue. The problem mainly persist for apple devices (latest safari browsers)

Hoping you will send some suggestions regrading this Issue

Thank you

[enter image description here][1]

$(document).on('click', '.submit-quote', function() {
                var url = "<?php echo $block->getUrl('request-quote/quote/convertToQuote'); ?>";
                var data = {
                    'id' : $(this).data('id')
                }
                $(".submit-quote").attr("disabled", true);
                $.ajax({
                    url : url,
                    dataType : 'json',
                    type : 'POST',
                    data: data,
                    showLoader: true,
                    success : function(res)
                    {
                        $(".submit-quote").attr("disabled", false);
                        if (res.status == 200) {
                            swal.fire({
                                title: "<?= __('Sucess') ?>",
                                text: res.message,
                                icon: "success",
                                button: "<?= __('Ok') ?>",
                                confirmButtonColor: '#323776',
                            }).then(function() {
                                document.location.assign("<?php echo $block->getUrl('shop/quote/success'); ?>");
                            });
                        } else {
                            swal.fire({
                                title: "<?= __('Failed') ?>",
                                text: res.message,
                                icon: "error",
                                button: "<?= __('Ok') ?>",
                                confirmButtonColor: '#9F8830',
                            });
                        }
                    }
                });
            });
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda