How can I make it look in the right place no matter what PC the USB Drive is plugged into????
The code is directed to the folder with this line:
Code:
var foldedToList = 'C:\\Windows\\System32';
For my PC, the removable USB drive is F:\ so as long as the code has the correct path it can display the folder contents. For example, right now I am testing it by looking at one of my web graphics folders. I am using the following which works fine on my PC:
Code:
var foldedToList = 'F:\\GUI\\images\\MainButons';
However on other PCs it may be a different drive letter. On my wife's it is E:\. Thus on her PC the code can't find the folder F:\\GUI\\images\\MainButons.
In html, when directing to images, the full path is not needed. You can just start with the folder you are in and leave out the preceding stuff such as
Code:
<img src="images/MainButons/MButton_Main_on.jpg" ....
Is there any way I can make my javascript work with out giving it the full path? Is there a way to do it like we do the image paths? If I did not have to give the full path, I may be able to get around the changing drive letter problem.