I have dragged a folder named mydocs and selected the "create folder references." option in coy menu. Here is my folder hierarchy.
|- mydocs
|- newfolder
|- anothernewfolder
|- js
|- main.js
|- view
|- html
|- index.html
I have to call the main.js file from index.html file. For now I am using the absolute path "user/...../mydocs/newfolder/anothernewfolder/js/main.js" for including the file. It works like charm on simulator but when I run this on device I doesn't gets called.
How to call the .js files from the .html file residing in different directories?
After searching over the internet I found this answer in this post and by looking at it
../../anothernewfolder/js/main.js
worked for me as ..
means up one directory and .
means current directory.
So I have to go up two time for finding the directory of the .js files.
But I am unable to find how the .js file can refer to another .js file of different directory?