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

Navigation 1

Status
Not open for further replies.

LOW

Programmer
Sep 27, 2000
45
US
When I'm on a page with a link to it in my bottom navigation, I would like the underline (text-decoration)for that particular page link to disappear, and then reappear when I've moved on to another page. I'm really not sure how to accomplish this. I welcome any ideas you may have.
 
A little more information is necessary.

I am assuming you are using includes, otherwise this would be a wired question. So how are you including them? what language? etc.
 
Actually, I'm incorporating this into a "shell" of a portal (BEA) which is sort of like using an include. It's html.
 
Here is a function I found to get the url information.
Code:
// Current Page Reference
// copyright Stephen Chapman, 1st Jan 2005
// you may copy this function but please keep the copyright notice with it
function getURL(uri) {
	uri.dir = location.href.substring(0,location.href.lastIndexOf('\/'));
	uri.dom = uri.dir; 
	if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
	uri.path = ''; 
	var pos = uri.dom.indexOf('\/'); 
	if (pos > -1) {
		uri.path = uri.dom.substr(pos+1); 
		uri.dom = uri.dom.substr(0,pos);
	}
	uri.page = location.href.substring(uri.dir.length+1,location.href.length+1);
	pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	uri.ext = ''; 
	pos = uri.page.indexOf('.');
	if (pos > -1) {
		uri.ext =uri.page.substring(pos+1); 
		uri.page = uri.page.substr(0,pos);
	}
	uri.file = uri.page;
	if (uri.ext != '') uri.file += '.' + uri.ext;
	if (uri.file == '') uri.page = 'index';
	uri.args = location.search.substr(1).split("?");
	return uri;
}

var uri = new Object();
getURL(uri);
You can then check the uri.page to see what page you are on. From there you can document.write the proper information depending on what page you are on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top