Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change css menu class on page load

Status
Not open for further replies.

rogerte

Programmer
Nov 9, 2001
164
GB
Hi,

We are in process of changing pages from SHTML to ASP, as we have some dynamic content that is added to each page.

One thing we have is an included CSS Menu that is basically:

<tr>
<a href="Index.shtml" class="NoGroup">Home</a>
<a href="Page2.shtml" class="NoGroup">History</a>
.
.
<a href="Page11.shtml" class="NoGroup">Contact us</a>
<script language="javascript">setMenuClass()</script>
</tr>

The setMenuClass changes the class of menu item if the current page name is the same name as the href page called by a menu item. Basically it is to highlight the current page in a different color, and doesn't make the current page menu item selectable

We are trying to do away with javascript where possible, so am wondering if this is possible using ASP?

Many thanks

Roger
 
it sounds like this
Code:
if OnCurrentpage then
 response.write class="ThisPage"
else
 response.write class="NoGroup"
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top