I have an external javascript function that just declares an empty array. I have two files that use this array, the first one appends to the array using the push method, the second one searches through the array and looks for the values added to the array, if it's there. My problem is that every time I try to search the array, It comes up empty, which means nothing is added to the array.
This is the content of my .js file:
var users = [];
This is the javascript part of my .html file:
<script type="text/javascript" src="array.js"></script>
<script type="text/javascript">
var uname = "someone";
var pword = "something";
users.push(uname);
users.push(pword);
</script>