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 link property dependent upon page viewer is on

Status
Not open for further replies.

occas

Technical User
Jan 14, 2004
164
US
i have pages set up using css classes for hyperlinks.

a.buttons:link {
etc.
}

i would like to put a second hyperlink class to the page.
say :
a.buttonstwo.link {
etc.
}
if i know what page the view is on, i would be able to assign that class to the particular link. two problems.
i don't know how to determine the page the user is on. and how do i change the class of the hyperlink. i can do this with asp.net using :
request.rawurl to determine the page and
hyperlink1.cssclass = "buttonstwo" for the link switch.
would like to do it without the asp.net or at least know how.
ty.
 

I would have thought that if you want different styles on different pages, you would include different CSS files on each page... Or just have one CSS file with different class names for the links on each page...

Hope this helps,

Dan
 
well dan, forgot to mention that i am using a header control that is on every page. that way if i need only make one change for all pages.
ty.
 

If you're using a headre control, do you have access to server-side scripting (ASP, PHP, JSP, etc)?

If so, you could parsethe filename and switch classes dynamically.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top