M
Martien van Wanrooij
I am rather new to asp and tried the following script in order to create a
list of menu items where the item referring to the current page should not
be act like a link.
<%
sub maakSubLinkWaarNodig (strUrl, strOmschrijving)
strDezePagina = Request.ServerVariables("SCRIPT_NAME")
if instr(strDezePagina, strUrl) > 1 then
response.write "<span class = currentPage>"& strOmschrijving &
"</span><br><br>"
else
response.write "<a href =" & strUrl & ">" & strOmschrijving &
"</a><br><br>"
end if
end sub
%>
Its behaviour is a little bit unpredictable. I am trying in at
www.cbsreizen.nl/test but it seems to work only on the pages related con
"Roses" .
I also tried the instr function with larger then zero, same result. When I
add for testing purposes response.write strDezePagina, the correct page
including a part of the path is represented.
A second question: is it possible to retrieve only the name of the document
itself _without_ the path, it can be done in php but I couldn't find a
similar ASP function.
Thanks for any comment.
Martien van Wanrooij
list of menu items where the item referring to the current page should not
be act like a link.
<%
sub maakSubLinkWaarNodig (strUrl, strOmschrijving)
strDezePagina = Request.ServerVariables("SCRIPT_NAME")
if instr(strDezePagina, strUrl) > 1 then
response.write "<span class = currentPage>"& strOmschrijving &
"</span><br><br>"
else
response.write "<a href =" & strUrl & ">" & strOmschrijving &
"</a><br><br>"
end if
end sub
%>
Its behaviour is a little bit unpredictable. I am trying in at
www.cbsreizen.nl/test but it seems to work only on the pages related con
"Roses" .
I also tried the instr function with larger then zero, same result. When I
add for testing purposes response.write strDezePagina, the correct page
including a part of the path is represented.
A second question: is it possible to retrieve only the name of the document
itself _without_ the path, it can be done in php but I couldn't find a
similar ASP function.
Thanks for any comment.
Martien van Wanrooij