JS file not working

epiz_27757503 or webhunter.epizy.com

Error Message

my website is not loading JS code and when I click on JS file by going to ‘view page source’
I get redirected to : https://infinityfree.net/errors/404/

Other Information

I request you to help ASAP

Do you upload your files properly?

1 Like

Your actual JS file is returning 404, make sure you have uploaded it and that you are putting the right path in the document.

4 Likes

yeah they are well uploaded and they are even working in local machine
i tried many times but its not working

Can you show what you can see on your FTP?

1 Like

Okay, found your problem.

In your index.html file, your putting js/index.js as where the JS file is located. Change that to index.js and your page should work.

4 Likes

thanks myan
i didn’'t noticed that

1 Like

The same goes with your CSS file, which I didn’t notice. Change that to just style.css.

4 Likes

thanks man you are amazing

2 Likes

If you use a / as the first character, it moves to the home page of the site. If you don’t use a / as the first character, it will be specified to the current directory.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.