Solved my problem, but now another accurs, take a look at the
http://www.tdsoft.se again.
The top link is now messed up, just because I add another class to it.
When I click on a link I change its classes from
class="top_link top_link_unSelected"
to
class="top_link top_link_selected"
but now the buttons pile above each other. Anyone know the reason?
added this to javascript and works
Code:
function handleLinkNavigation(menuId,linkId){
var selectedLink ="top_link" + " " + "top_link_selected";
var unSelectedLink ="top_link" + " " + "top_link_unSelected";
document.getElementById('ts-colhead-name').innerHTML = selectedLink;
menuNavigation(menuId,linkId, unSelectedLink,selectedLink);
}
function menuNavigation(menuId,whereToSearchId, classToFind,classToReplace) {
var allSelectedLinks=document.getElementById(menuId).getElementsByTagName("*");
//Cycle through the tags using a for loop
for (i=0; i<allSelectedLinks.length; i++) {
allSelectedLinks[i].className = classToFind;
}
var currentLink = document.getElementById(whereToSearchId).getElementsByTagName("*");
for (i=0; i<currentLink.length; i++) {
//Pick out the tags with our class name
currentLink[i].className = classToReplace;
}
}
Its just when I change the class from
class="top_link top_link_unSelected"
to
class="top_link top_link_selected" (note that there are 2 classes, the top_link class always occurs in both cases, it is the "top_link_unSelected" and the "top_link_selected" that messes things up.
perhaps I can solve this in another way?
that problem occurs, and has to do with my css, but don't know how do fix it.