Hey all,
I’ve created various projects on websites like codeacademy and codepen and decided to transfer my code into an external text editor (Notepad++).
When I run the HTML files in my browser, the CSS files works fine but the JavaScript files do not work (unless I use inline event handlers). I’ve linked the files in the HTML document, made sure they all sit in the same folder, and have run through the code for an possible syntax mistakes.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="test.css"/>
<script src="test.js"></script>
</head>
I feel as though I am missing something simple within the JS file because whenever I use inline event handlers, the JavaScript files run fine. When I use traditional event handlers, the file does not work at all.
Any ideas about what I might be doing wrong?
Thanks