Javascript display current directiory |
Javascript display current directiory |
tk=lm2408 |
Feb 7 2017, 05:43 AM
Post
#1
|
Newbie Group: Members Posts: 19 Joined: 31-January 17 Member No.: 26,289 |
Hi,
I'm trying to list the current directory that the current page is located in. I have it working except it displays %20 instead of a space in the directory name. The code I have is: CODE var path = document.location.pathname; var dir = path.substring(path.indexOf('DIRLISTTEST/', 1), path.lastIndexOf('/')); document.write(dir); Can anyone help? Thank you for your time Greg |
tk=lm2408 |
Feb 16 2017, 12:31 AM
Post
#2
|
Newbie Group: Members Posts: 19 Joined: 31-January 17 Member No.: 26,289 |
Yeah I just tried IE on that machine and the same thing happens. Haven't really had much time lately to find out what is going on. If I find an answer I'll be sure to post it here.
|
pandy |
Feb 16 2017, 01:07 AM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,732 Joined: 9-August 06 Member No.: 6 |
I guess we have to give up. Yeah, please do. These things drive me nuts.
|
Lo-Fi Version | Time is now: 26th April 2024 - 06:56 PM |