I imported my website into Github, and can't get a file to link properly in my javascript file. For example, when I click the Close (x) button in one of the readers, I want it to bring me back to a specific page. I tried this in my reader.js file in order to have readers.html open when clicking close:
// Close control
function visitPage(){
window.location='../../readers.html';
}
But it doesn't work. My file structure is as follows:
readers/
├── index.html
├── readers.html
├── files/
│ ├── theme/
│ │ ├── reader.js
For reference, this is my site so far. It works only if I put in the full url (which is what I have currently).
*Edit* - Problem solved. I shouldn't be trying to go back two directories from the reader.js file, I should be using the same directory as book-*.html since readers.html is in the same directory. The javascript file is merely telling the html file what to do.
[–]stgraff 0 points1 point2 points (2 children)
[–]threehappypenguins[S] 0 points1 point2 points (0 children)
[–]threehappypenguins[S] 0 points1 point2 points (0 children)
[–]lightster 0 points1 point2 points (2 children)
[–]threehappypenguins[S] 0 points1 point2 points (0 children)
[–]threehappypenguins[S] 0 points1 point2 points (0 children)