I have a code with a list of variables like this:
var sounds = {
"hello" : {
url : "sound/hello.mp3"
},
"gasp" : {
url : "sound/gasp.mp3",
},
"scream" : {
url : "scream.mp3",
}
};
the directory "sound" contains a lot more so for the sake of convenience I would like javascript to automatically list the files and create the variables accordingly. I read somewhere javascript cant access client side directories so if thats the case what alternatives do I have to achieve this?
P.S. I CANT use PHP, my server doesnt support it and I cant change that.