Home > ASP Development > CSS dynamic menu

CSS dynamic menu



Hello people!



This my first post to this forum.



I am building up a web application which should have a two level dynamic (ASP) css menu. My problem is that I do not know how I could make id="active" to show on pages that are on certain folder. I should be able to do this because I have to use following code on sub menu:




Code:



<% if Request.ServerVariables("URL") = "/yourpage.asp" then
response.write "id=""active""
end if %>






Does anyone of you know how can I make this happen??



Thank you,



Tursas

    
Guest


Try this:


Code:



<% if Request.ServerVariables("URL") = "/yourpage.asp" then
response.write "id=""active"""
end if %>



Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by PhoenixBoy
Try this:


Code:



<% if Request.ServerVariables("URL") = "/yourpage.asp" then
response.write "id=""active"""
end if %>






Exactly, or you can switch between ASp and HTML (spaghetti code):



<% if Request.ServerVariables("URL") = "/yourpage.asp" then %>

id="active"

<% end if %>

Was this answer helpful ? Yes No   
Guest


Thank you guys!



But it was not what I am looking for. I managed to find this script:


Code:



<% if InStr(Request.ServerVariables("URL"), "/intranet/") > 0
then response.write "id=""active_main""" end if %>






InStr counts the number of times a particular string appears within another. As long as my folder names aren't duplicated in files that exist in other folders, I should be OK.



Yes I should but how can I get URL part for example /intranet/ from the database so I can make css menu fully dynamic??



Tursas

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved