Alright, I have a js file in another folder, and I have my homepage in the one under it. Everything is happy and fine when the Js is in my homepage but once it is outside my linking does not work... this is the JS and this is the Homepage... nothing to complicated here... HTML Code: <html> <head> <title>Resume</title> <script src="js/Final_Project.js" type="text/javascript"></script> <link href="css/StyleSheet.css" rel="stylesheet" type="text/css" /> </head> <body onload = "LoadImages(); runner()" > <h1 class="txtcenter"> Resume Homepage! </h1> <img src="img/meandwhiskey.jpg" class="Fimg" alt="Not Working" /> <br/> </body> </html> HTML: Java Script Code: var pics = new Array(); var index = 0; function LoadImages() { pics[0] = new Image(); pics[0].src = "../img/meandwhiskey.jpg" pics[1] = new Image(); pics[1].src = "../img/sivanhadas.jpg"; pics[2] = new Image(); pics[2].src = "../img/Sivan1.jpg"; pics[3] = new Image(); pics[3].src = "../img/Sivan2.jpg"; pics[4] = new Image(); pics[4].src = "../img/Sivan3.jpg"; document.images[0].src = pics[0].src; } function runner() { var Timer = setInterval("move()", 4000); } function move() { index ++; if (index > 4) { index = 0; } document.images[0].src = pics[index].src; } Code (markup): I placed in an alert message in all 3 functions in the JS to see if it worked. and it does. I tried placing different pictures in there besides the ones I have and it doesn't work. I really don't know what I am doing wrong here...
yea, that was the problem, I figured it out yesterday, I don't think the teacher explained it enough to us about how attaching js files to an html file is basically like adding it onto of it... although, now that I think about it, it makes sense. that is how I fixed it