Hi, I am using php. Create a file leftcolumn.php which includes following codes..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript">
function setClass( tabName ){
document.getElementById(tabName).style.background = '#f0f7fa';
document.getElementById(tabName).style.color = '#c66653';
}
</script>
</head>
<body>
<div id="sidebar">
<img src="images/logo.png" />
<ul class="sideNav">
<!-- Use class="active" for selected tab -->
<li><a id="dashboard" href="cms.php" onclick="setClass('dashboard');">Dashboard</a></li>
<li><a id="mainMenu" href="menus.php">Main Menus</a></li>
<li><a id="retailers" href="#">Retailers</a></li>
<li><a id="productimages" href="productimages.php">Product Images</a></li>
<li><a id="pressreleases" href="pressreleases.php">Press Releases</a></li>
<li><a id="news" href="news.php">In the News</a></li>
</ul>
<!-- // .sideNav -->
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</div>
</body>
</html>
Now, I just want to apply background = '#f0f7fa' & color = '#c66653' (on active tab) when user click on a tab, for this I created a function but it does not apply change.....!
Kindly help to solve it....
Thanks.....