473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Current Page !

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
Jul 19 '05 #1
2 1150
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>
<% Next %>
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)


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
http://www.aspfaq.com/2072

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Adam Knight" <ad**********@optusnet.com.au> wrote in message
news:O7**************@TK2MSFTNGP12.phx.gbl...
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

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Don G | last post by:
Within the menu for my site, I have inserted 'class="current"' within the link for the current page. So the link looks somthing link: <li><a href="index.php" class="current">Home</a></li> The...
15
by: SFX | last post by:
If I have a session ID (string) can I somehow obtain the session object associated to that ID (it exist of course) ? I know this sounds wicked but I have a situation in which I have to make a...
3
by: Rhino | last post by:
Yesterday, I reworked the index on my site - http://sfl.london.on.ca - so that they used list markup and I'm quite pleased with them. However, I'm having a problem with one small aspect of the menu...
3
by: laryten | last post by:
Hi, Is there a way to update the same web page instead of getting a new page each time we click the submit button? The simplest thing to do is to delete the current page (or go back to the...
2
by: =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post by:
Hi, I'm using Threads, and when I try to do Server.Transfer, I recieved an error. (child object does not exist...) My Code: Dim t As New Thread(AddressOf Hilo) Private Sub Hilo()...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.