hi,

problem: IE6 does not pay attention to fragment of code which describes the fade effect.

clicking those links different type of content fades in.
works perfectly on Opera, FF, Safari.

javascript code:


Code:
function solidMe(subobjstr, op)
{
var subobj = document.getElementById(subobjstr);
subobj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + op + ");";
subobj.style.opacity = op / 100;
}
Code:
function callAHAH(url, pageElement, callMessage, errorMessage)
{
document.getElementById(pageElement).innerHTML = callMessage;

try
{
req = new XMLHttpRequest(); /* e.g. Firefox */
}
catch(e)
{
try
{
req = new ActiveXObject("Msxml2.XMLHTTP"); /* IE */
}
catch (e)
{
try
{
req = new ActiveXObject("Microsoft.XMLHTTP"); /* IE */
}
catch (E)
{
req = false;
}
}
}

req.onreadystatechange = function() { responseAHAH(pageElement, errorMessage); };
req.open("GET", url, true);
req.send(null);
}

function responseAHAH(pageElement, errorMessage)
{
var output = '';

var subobj = document.getElementById(pageElement);
op = 0;
subobj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + op + ")";
subobj.style.opacity = op;
while(op < 100) {
op = op + 10;
setTimeout("solidMe('" + pageElement + "', " + op + ")", op * 5);
}

if(req.readyState == 4)
{
if(req.status == 200)
{
output = req.responseText;
document.getElementById(pageElement).innerHTML = output;
}
else
{
document.getElementById(pageElement).innerHTML = errorMessage+"\n"+output;
}
}
}

function makeactive(tab)
{
callAHAH('/additional/content.php?id= '+tab, 'spec_content', '<p class="loading">Loading...</p>', 'Error: bad request.');
}

html code:

Code:
<a href="javascript:makeactive(1)">Home</a>
<a href="javascript:makeactive(2)">Contact</a>

<div id="spec_content"></div>

any ideas why IE is so angry on this code?

thanks a lot