I am currently reading the book java script novice to ninja, for some reason the code in the book is not working for me. I have it word for word. It has something to do witth the linking of the files the html file “src =” it does not link to other files, can someone explain why?
That’s why it’s not working - the files aren’t where you say they are. These two lines are telling the browser that the separate files are in separate directories
That will get you up and running quickly, but can be detrimental in the long run as your sites get more complex. It’s better to get into the habit of separating your files into common folder structures for maintenance in the future. So (IMHO), the better approach would be to go into your desktop folder and create two folders inside it, one called css, and one called js. Next, move the styles.css folder into the css folder, and the scripts.js folder into the js folder.
Yeah, I am VERY new at this. I just deleted everything and started from scratch. Now it is working. Looking back on it, I did not have the files saved in the right place.
Definitely. There’s nothing there that requires any server-side processing, it all just runs in the browser. So long as things are as Sam suggests above, you’ll be fine.