Re: retrieving current file name through asp or javascript?
by Eric Anderson <eric_anderson(at)hrsoft.com>
|
Date: |
Wed, 17 May 2000 15:22:16 -0500 |
To: |
pbabcock(at)bgsgroup.com, "hwg-languages(at)hwg.org" <hwg-languages(at)hwg.org> |
References: |
jeff felix jeff2 |
|
todo: View
Thread,
Original
|
|
Here ya go!
Function CurrentFileName()
Dim arPathInfo
Dim arFileNameWithQueryString
arPathInfo = split(Request.ServerVariables("PATH_INFO"), "/")
arFileNameWithQueryString = split(arPathInfo(Ubound(arPathInfo,1)), "?")
CurrentFileName = arFileNameWithQueryString(0)
End Function
And this even gets rid of any QueryString garbage that may have been passed
along.
You can copy and paste that anywhere you like! ;-)
Eric
At 02:25 PM 5/17/00 -0400, Phil Babcock wrote:
>Thanks! This did the trick, as I can easily use a replace() to get rid of
>the directory name. I am still in search of a function that returns *only*
>the file name though...
>
>:)
>
>
>
>*********** REPLY SEPARATOR ***********
>
>Rossi Designs wrote:
>
> >I think in ASP it's
> >
> ><% = Request.ServerVariables("SCRIPT_NAME") %>
>
>*********** END REPLY SEPARATOR ***********
>Phil Babcock
>Lead Web Designer
>BGS Group Inc.
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA