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

191
Visualizações
How to use same JS files for HTML pages?

At the moment, the files setup looks like this: File Setup in the merkur.html file I use this to go to the JS files:

<script src="../scripts/ui.js"></script>
<script src="../scripts/index.js"></script>

The JS is only working on the index.html, in the merkur.html I get the error: Error Message

Can somebody help me?

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

0

In your index.html file, keep the links to your JavaScript files as bellow.

<script src="scripts/ui.js"></script>
<script src="scripts/index.js"></script>

In your merkur.html file, keep the links to your JavaScript files as bellow.

<script src="../scripts/ui.js"></script>
<script src="../scripts/index.js"></script>

If you are still getting errors, you may have do something wrong in your JavaScript codes. Maybe you are trying to search for an HTML element which doesn't exist in your relevant HTML code.

Thanks and best regards!

about 4 years ago · Juan Pablo Isaza Relatório

0

You can use js files in any html document. The only one problem here is a path you wrote for merkur.html file.

So just read how to deal with path to files. Especially ../ & ./

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