Set opacity of VML roundrect element

422 Views Asked by At

I'm trying to figure out how to set the opacity of a v:roundrect VML element in Internet Explorer 8 with JavaScript. I tried simply setting the opacity property directly as well as the attribute with setAttribute but neither worked. How can I do this?

1

There are 1 best solutions below

0
On

Have you tried adding a v:fill element to the v:roundrect and set the opacity property ?

var vfill = document.createElement("v:fill");
vfill.setAttribute("color",fillcolor);
vfill.setAttribute("opacity",fillopacity);
roundRect.appendChild(vfill);