Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

219
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda