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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I highlight the active link on a dynamic menu

Status
Not open for further replies.

jonohara

Technical User
Mar 26, 2000
53
GB
I have a page which generates a navigation menu on the fly. The menu always contains a hyperlink to the current page as well as related pages.

Can vbscript help me make the active or current link standout (e.g. bold and bigger font).

Thanks
 
you can do it applying a style on it :
Code:
objLink.Style.fontweight ="bold"
Water is not bad as long as it stays out human body ;-)
 
You can just set the A.link attribute to bold. For example

Code:
 (html, this goes in the body section)  Alink="red"

or 

 (vbscript)     A.link="ff00ff"

etc
 
Thanks for those...

The problem is that I want this style to apply to just one link of several generated (ie the current selected page) not throughout the whole page.

Thanks again
 
couldn't you use a subroutine that is called by the current page link when it is generated. All the other links don't then call the sub routine.

I'm not 100% on how to do this, but it should at least work in theory!!!

Perhaps


maybe


possibly!
 
"The problem is that I want this style to apply to just one link of several generated "...
Well that's just what I meant. I assumed that objLink was an object created :
Code:
set objLink = document.createElement("A")objLink.Style.fontweight ="bold"
This code will apply the style to this anchor tag, not the other ones in the page. Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top