I created links that link two HTML files but one doesn't work.
There is a folder called aiGame which has the aiindex.html (and ai.js and ai.css). index.html is not in a separate folder.
These two lead to the same file but DON'T work. And are in the aiindex.html file in the aiGame folder:
<button id="twoPlayer" onClick= "location.href='index.html'"> 2 Player </button>
<a href="index.html"> 2 Player </a>
These two lead to the same file and do work. These two are in the index.html file which is not in a separate folder:
<button id="aiPlayer" onClick= "location.href='aiGame/aiindex.html'"> Play AI </button>
<a href="aiGame/aiindex.html"> Play AI </a>
I don't understand why one works but the other doesn't. It could be a mistake with the files. The syntax for linking can't be wrong because there are two ways and they both do not work. Any ideas? Thank You.