Current Page !

A

Adam Knight

Request.ServerVariables("SCRIPT_NAME") returns the current page being
executed along with the directory it exists in.

I want to simply return the current page being executed without directory
information.
Is their a server variable i can use to returns that page only. Otherwise,
must i use left function to extract the script portionof the value returned
by i Request.ServerVariables("SCRIPT_NAME") ???

Any thoughts about this..

Help appreciated !!!
AK
 
E

Evertjan.

Adam Knight wrote on 08 jun 2004 in
microsoft.public.inetserver.asp.general:
equest.ServerVariables("SCRIPT_NAME") returns the current page being
executed along with the directory it exists in.

I want to simply return the current page being executed without
directory information.
Is their a server variable i can use to returns that page only.

No.

This will show you all your servervariables:

<% For each d in Request.ServerVariables %>
<%=d%>
=
<%=Request.ServerVariables(d)%>
<br>
Otherwise, must i use left function to extract the script portionof
the value returned by i Request.ServerVariables("SCRIPT_NAME") ???

vbs:

url = Request.ServerVariables("URL")

url = mid(url,instrrev(url,"/")+1)

Response.write url

js:

url = Request.ServerVariables("URL")+""

url = url.replace(/.*\//,"")

Response.write( url)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top