This is the structure of my HTML:
<html>
<body>
<head>
...
<script type='text/javascript' src="js/javascript.js"></script>
</head>
...
<button class="submit" onclick="submitted()">Submit</button>
</body>
</html>
My file directory is Desktop/Project/. Within the project folder the HTML file is on its own and there is a subfolder called js where javascript.js exists.
Within the external js file it goes something like this:
function submitted(){
...
subtask(variable)
...
}
function subtask(param){
...
}
Within submitted() I added alert('hello'); as the first thing and it wouldn't trigger the alert when I refresh the html page. Am I doing something wrong?