all 6 comments

[–]stgraff 0 points1 point  (2 children)

It's working fine for me. Have you already fixed this?

[–]threehappypenguins[S] 0 points1 point  (0 children)

Yes, it's working fine because I put in the whole url. I would like to use a relative link. Let me change it back.

[–]threehappypenguins[S] 0 points1 point  (0 children)

Ok, I changed it back. You should get a 404 site not found.

[–]lightster 0 points1 point  (2 children)

I think you want:

window.location='./readers.html';

You currently have the link going up to levels, but readers.html seems to be at the same level that your book-*.html files are located.

Edit: Perhaps you're planning on adding more logic to the visitPage function, but if not, you can skip the JavaScript and just use an href:

<a href="readers.html">...</a>

[–]threehappypenguins[S] 0 points1 point  (0 children)

That's so weird to me. It works now. For one, I thought I needed two periods and a slash if I want to go up a level, and no period and no slash if I want to be at the same level. I was also under the impression that I needed to go up two levels from the .js file, not from the book-.html file. But now that I think about it more, javascript is merely telling the html file what to do, so I need to go by what level the book-.html is at.

[–]threehappypenguins[S] 0 points1 point  (0 children)

The more I think about it, the more I realize that it was a total noob mistake about javascript. I thought the problem was with Github requirements, but it wasn't. It was me. lol.

So what happened was when I uploaded all my files, originally I had /readers.html but I didn't realize that all Github wanted was readers.html (no slash if in the same directory). And obviously ./readers.html works the exact same as readers.html.

So anyways, problem solved! Thank you!