Hmm well you can replace "window/" inside any mention of it inside the .js file, such as:
Code:
imagefiles:['/windowfiles/min.gif', '/windowfiles/close.gif', '/windowfiles/restore.gif', '/windowfiles/resize.gif'], //Path to 4 images used by script, in that order
with a dynamic variable that changes based on where the file is called. Doing this on the server side, you would first rename dhtmlwindow.js to dhtmlwindow.php instead, which makes it possible to include PHP variables within its contents, such as:
Code:
imagefiles:['<?echo $dynamicvar;?>min.gif', '<?echo $dynamicvar;?>close.gif', '<?echo $dynamicvar;?>restore.gif', '<?echo $dynamicvar;?>resize.gif'], //Path to 4 images used by script, in that order
This all assumes you have $dynamicvar pre-populated with the appropriate path depending on where dhtmlwindow.php is being called from at the moment etc.
You can potentially do this without involving the server side (ie: no renaming of .js to .php), but then the tricky part becomes trying to figure out what the dynamic path should be, since using server side provides a lot more flexibility in figuring out things about the server than using JavaScript.
Bookmarks