I just discovered that if you call setOpacity in IE on an element that 
was just created (and so hasn't been added to the DOM yet), an exception 
will be thrown.  It looks like the currentStyle object on the element is 
not set until after it has been attached to the DOM.  An example script is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript">
function test() {
    var div = new Element('div');
    div.setStyle({
        background: 'blue',
        opacity: .5
    });
    div.update('This Worked');
    document.body.appendChild(div);
}
</script>
</head>
<body>
<input type="button" onclick="test()" value="Click Me!" />
</body>
</html>


I filled a bug #9904 on it.   This affects 1.6rc0 and since there was no 
changes to this part of the code for 1.6rc1, I believe it affects that 
as well.

Trevan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to