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

138
Visualizações
load ajax url on new page?

enter image description herei know this question is not asked well & iam sorry for that

given requirement is that url shoul be open in _blank page but i have design ajax url is it possible ajax url is open in new page? like regular url other wise i have to change lots of things here is the code

  function pdfPrint(start_date , end_date , view){

    var startDate = $('#setDate-'+start_date).val();
    var endDate = $('#setDate-'+end_date).val();       
    data = {
            "startDate":startDate,
            "endDate":endDate,
            "view":view,
            "systemid":system_id,
        };
    $.ajax({
        url: "{{route('download.pdf')}}",
        type: "get",
        'headers': {
          'X-CSRF-TOKEN': '{{ csrf_token() }}'
        },
        data:data,
    }).done(downloadFile);       
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

this simple trick to open window and exec js code;

let js = `<script>
    function pdfPrint() {
        window.print();
    }
    
    // exec your function
    pdfPrint();</` + `script>`;

let win = window.open("", "MsgWindow", "width=400,height=400");
win.document.write(js);
about 4 years ago · Juan Pablo Isaza Relatório
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