I'm hoping to set the background of a modal dialog as semi-transparent. This works find in firefox 2 and 3:
Code:
if (e.filters) {
		e.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + this.iOpacity + ')';
} else if (e.style) {
	e.style.opacity = (this.iOpacity/100);
} else {
	alert('Unable to set opacity of modal dialog background.');
}
however, ie7 chokes on it and fails to complete the function in which that code lives. the e.filters reference appears to be the problem.

I have also tried this to no avail:
Code:
e.style.opacity = (this.iOpacity / 100);
e.style.MozOpacity = (this.iOpacity / 100);
e.style.KhtmlOpacity = (this.iOpacity / 100);
e.style.filter = "alpha(opacity=" + this.iOpacity + ")";
Can anyone give me a browser-proof means of setting opacity for an HTML element?