What is the reason behind this code functioning successfully only when the alert function is called? The color changes after closing the alert box, but if the line with the alert command is commented out, nothing happens.
function setLinkColor(el)
{
var color = getStyle(document.getElementById(el.id), "color");
alert(el.id);
document.getElementById("content").style.borderColor = color;
}