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

218
Visualizações
Including JS file returns html content

I am facing this problem, and i cannot figure it out. Its simple thing, i need to include my js file into a head. But in my page I've got error Uncaught SyntaxError: Unexpected token '<' in ShopData.js:1 . So I've checked that file in chrome inspector, and i see that there is no JS content inside of it. It basically clone the html file and include it as js. How this can even happen and what is the solution? In ShopData.js is pure JS content, no includes or something. I've already checked permissions for that files and set it to read/write but no result, whole page is in domain hosting. Thanks for any advice.

   <head>
        <meta charset='utf-8'>
        <meta name='viewport' content='width=device-width, initial-scale=1'>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script src="ShopData.js"></script>
    </head>

JS File:

  var ShopID = 0;
  var Name = "";
  var City = "";
  var Street = "";
  var PostCode = "";
  var State = "CZ";
  var Longitude = "";
  var Lattitude = "";
  var Email = "";
  var Telephone = "";
  var Tittle = "";
  var Description = "";
  var Keywords = "";
  var Barbers;
  var OpeningHours;
  var ItemTypes;
  var Items;
  let ShopData = {};

    jQuery.ajax({
    type: "GET",
    url: "https://example.com/",
    dataType: "json",
    success: function(response) {
      console.log(response);
    }
  });

Screenshot of responseenter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This file isn't valid JavaScript so it will give that error: https://barber.minuto.cz/web/ShopData.js

Also it seems to give that response no matter which URL you type in: https://barber.minuto.cz/web/asdfasdf

Also you may want to make it so everyone can't login here since it is out in public now: https://barber.minuto.cz

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