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

108
Vistas
Javascript not functioning when conducting local testing

Good Morning/Afternoon/Evening all,

I'm working on developing a fairly simple webpage, I have index.html setting up the appearance of the page and in the header I have a link to a js file:

<script src="toOutput.js"></script>

Later on I have a button that's linked to a function in the js file:

<input type="button" id="update" name="update" value="Update" onclick="getInput()"><br>

I know the connection between these function is set up correctly because I have it running publicly on a separate system while I continue development. However, as I'm trying to conduct further testing locally for the life of me I cannot get the javascript to run. I've tried using the npm module http-server to host and I can navigate to the page which appropriately pulls and uses style.css, and if I view the source code I can click on toOutput.js and I see the code, but when I click the update button the code doesn't run. I've also tried using 'python3 -m http.server 8000' again I can see the page and style.css loads, and the javascript is there, but won't execute. Finally I tried copying the environment I have set up running the page publicly which uses apache2 and points at the appropriate directory. Once again, I can navigate to the page when I use this method, all the code is there, and still the javascript does not run. I've also cleared the cache in the browser a bunch of times and tried other methods for calling the javascript, like adding an event listener within it, none of it has worked.

What am I missing?

about 4 years ago · Juan Pablo Isaza
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