I am loading in the following navbar html from a required PHP file:
<ul id="navlist">
<li id="active"><a href="#" id="current">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="news.php">News</a></li>
<li><a href="applying.php">Applying</a></li>
<li><a href="current.php">Current <br />Residents</a></li>
<li><a href="alumni.php">Alumni</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
Depending on the page that I am on (let's say I am on the alumni.php page) I want that list item to be given the ID "active"?
Edit: Here is my header.php code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="styles/main.css" type="text/css" media="screen" charset="utf-8"/>
<link rel="stylesheet" href="styles/navbar.css" type="text/css" media="screen" charset="utf-8"/>
<title>some title</title>
</head>
<body>
<div id="header">
<div id="left">
<img src="images/tree.png" alt="tree" width="87" height="98"></img>
</div>
<div id="right">
<
</div>
</div>
<div id="navigation">
<ul id="navlist">
<li><a href="index.php" id="current">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="news.php">News</a></li>
<li><a href="applying.php">Applying</a></li>
<li><a href="current.php">Current <br />Residents</a></li>
<li><a href="alumni.php">Alumni</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</div>
I assume that I need to do this through Javascript once the page loads? How would I do this?