Adding a class to a link based on page location
Hi everyone,
I'm pretty new to ASP and have recently started using the #include jazz. It's pretty useful.
Just now I replaced a submenu that appeared on three pages with:
Code:
#include file="../includes/submenu-ins.asp"
Submenu-ins.asp looks like this:
HTML Code:
<div id="submenu">
<ul>
<li><a href="../institucional/default.asp" title="A Home Care Medical">A Home Care Medical</a></li>
<li><a href="../institucional/historia.asp" title="História">História</a></li>
<li><a href="../institucional/tecnologia.asp" title="Tecnologia">Tecnologia</a></li>
</ul>
</div>
The only drawback is that previously I had given a class, called 'selected' to the link of the page being viewed.
i.e. On 'default.asp' the link to 'default.asp' had the class 'selected', like this:
HTML Code:
<div id="submenu">
<ul>
<li><a class="selected" href="../institucional/default.asp" title="A Home Care Medical">A Home Care Medical</a></li>
<li><a href="../institucional/historia.asp" title="História">História</a></li>
<li><a href="../institucional/tecnologia.asp" title="Tecnologia">Tecnologia</a></li>
</ul>
</div>
...on 'historia.asp' the historia link had the class 'selected' and on 'tecnologia.asp' the tecnologia link had the class 'selected'.
Does anyone know how I could use the include jazz and still use this system of giving a certain class to the selected links?
Thanks,
Dog