Forum Moderators: open

Message Too Old, No Replies

Show link as selected

depending on what directory you're in

         

SuzyUK

4:02 pm on Oct 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi I'm looking for some help or pointer to an asp script that will determine what directory someone is in so the relevant link (about 20 so far) will remain highlighted no matter what page, within that directory they go to

any pointers

Suzy

SuzyUK

12:16 am on Oct 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi sorry about the wrong board post, prevoiusly...I knew when I posted it, ...but does anyone know?

Suzy

RossWal

5:13 pm on Oct 22, 2002 (gmt 0)

10+ Year Member



Not exactly sure what you're trying to do, but check out request.servervariables("path_info"). I returns the path the user is in.

iJeep

6:18 pm on Dec 7, 2002 (gmt 0)

10+ Year Member



I use:
<%if InStr(Request.ServerVariables("SCRIPT_NAME"),"Name_You_Are_Looking_For") > 0 then%>
for my sidebar navigation to collapse and expand menus

duckhunter

8:59 pm on Dec 7, 2002 (gmt 0)

10+ Year Member



Request.ServerVariables("URL") works in both ASP and .NET

If you have .NET check Request.Url.AbsolutePath and the whole Request.Url class

You're going to have to parse out the folders. I do this:

arrayFolders = split(Request.Url.AbsolutePath, "/")
then throw out the first and last array element.

Let say:
Request.Url.AbsolotePath = "/First/Second/MyPage.aspx"

then arrayFolders = split(Request.Url.AbsolutePath, "/"
would yield the following array:

arrayFolders(0) = ""
arrayFolders(1) = "First"
arrayFolders(2) = "Second"
arrayFolders(3) = "MyPage.aspx"