Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!