Re: retrieving current file name through asp or javascript?

by "Eric V. Myer" <evmyer(at)matrixpc.com>

 Date:  Wed, 17 May 2000 14:19:19 -0400
 To:  <pbabcock(at)bgsgroup.com>,
<hwg-languages(at)hwg.org>
 References:  felix
  todo: View Thread, Original
Phil,
 You can probably glean this information from the ServerVariables collection
of the Request object. Check this page for a list of the available ones or
search the web on 'servervariables':
http://www.niblack.com/kbase/servervariables_x.asp

You might need to do some parsing to get just the document name since URL
and SCRIPT_NAME look like they include the path info, but this should be
easy to do. I didn't see one that just provided the document name. Format
for servervarible use is:

dim url

url = request.servervariables("URL")

This is server-side VBScript.

HTH,
Eric

----- Original Message -----
From: "Phil Babcock" <pbabcock(at)bgsgroup.com>
To: <hwg-languages(at)hwg.org>
Sent: Wednesday, May 17, 2000 12:55 PM
Subject: retrieving current file name through asp or javascript?


> Hi all
>
> Anyone know of a way, through either ASP (vbscript) or javascript to
return
> the file name of the current document?  I dont need the path or attributes
> or anything else, just the file name.  I would prefer a server-side
> vbscript, but client-side javascript might be ok as well.
>
> I looked through the ASP Scripting.FileSystemObject but it only seems to
be
> applicable if you can specify the file you are interested in.  I need
> something more dynamic, that will return the file name without any
> pre-knowledge of the name.
>
> Make sense?
>
> tia,
>
> Phil Babcock
> Lead Web Designer
> BGS Group Inc.
>
>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA