I’m trying to link to the directory above the web root, but it doesn’t work in JavaScript. It doesn’t matter how many ../ I use, it doesn’t go more than twice, which is required to reach the web root. (Using PHP this works fine, though) I think it should be possible right? Could it be a permission problem? Thanks.
I’m trying to link to the directory above the web root, but it doesn’t
Share
JavaScript is clientside — it runs on the browser, not the server. A correctly set up server will not let clients access stuff outside the designated area, independent of whether it’s from entering an URL into the addressbar, a link contained in an HTML page, or a URL created by JavaScript. It’s all the same for the server anyway — it’s just an URL.