I have a javascript method I quickly wrote:
[CODE]
function openCloseTable(elementID) {
var setElement = document.getElementById(elementID);
if (setElement.style.display == ‘none’)
setElement.style.display = ‘block’;
else
setElement.style.display = ‘none’;
}
I’m just trying to have the <div> container expand and collapse cleanly and efficiently, with minimal code.
I call the function like this:
[CODE]<a href=”JavaScript:openCloseTable(‘trainingContainer’)”>Training Objectives</a>
My problem occurs the first time you click on the link. It always never expands. However, if you click a second time, the <div> expands fine and collapses fine. It’s just that darn first click.
Any help is greatly appreciated.
Rez