url list to js array
Posted: Sun Jul 10, 2005 10:37 am
ok, i have a list of urls for music files that i want to turn into a javascript array for a tree menu. The urls look like this:
These urls have a unknown number of subdirectories. I need the output js array to look like this:
I need a function that will create this array where the parent directories go in the title. I have been able to preform this given a url, the problems arose when i needed to fill the js array with multiple parent directories and subdirectories. This has become a real headache and i would much appreciate some help
Code: Select all
http://192.168.1.101:8080/Del%20The%20Funky%20Homosapien/Both%20Sides%20of%20the%20Brain/01%20Time%20Is%20Too%20Expensive.mp3Code: Select all
var TREE_NODES = ї
ї'Del The Funky Homosapien', 'http://192.168.1.101:8080/Del%20The%20Funky%20Homosapien', null,
ї'Both Sides of the Brain', 'http://192.168.1.101:8080/Del%20The%20Funky%20Homosapien/Both%20Sides%20of%20the%20Brain', null
ї'01 Time Is Too Expensive.mp3', 'http://192.168.1.101:8080/Del%20The%20Funky%20Homosapien/Both%20Sides%20of%20the%20Brain/01%20Time%20Is%20Too%20Expensive.mp3', null]
]
]
];