different folder?

Monkey Targets Forums/HTML5/different folder?

Yoda(Posted 2012) [#1]
What do I have to change if I want the html-page to access a different folder for the game?

At the moment, the html-code and the data + main.js have to be in the same folder.
I want the data + main.js in a subfolder, but simply changing the path in the javascript of the canvas doesn't work somehow.

I used this: (data-folder and main.js are in the folder called 'minigame')

<canvas id="GameCanvas" onclick="this.focus();" oncontextmenu="return false;" width=185 height=140 tabindex=1></canvas><br>
<script language="javascript" src="minigame/main.js">Javascript not supported!</script>