Alphafix for IE6

From Documentation

IE6 failed to render a PNG with alpha transparency correctly. Please refer to here for more information.

ZK provides the fix, but you have to turn it on by specifying a JavaScript variable called jq.IE6_ALPHAFIX For example,

<?script content="jq.IE6_ALPHAFIX='.png';"?>
  <button image="foo.png"/>

where .png causes all PNG images to be fixed. If you want to fix certain images, you can do as follows

<?script content="jq.IE6_ALPHAFIX='more.png|-trans.png'?>

If <?script?> doesn't work, you can try using a regular script-component:

  <script type="text/javascript">jq.IE6_ALPHAFIX='.png';</script>
  <button image="foo.png" />

If you prefer to use plain Java instead of ZUL files, you can instantiate a Script component and append it to another component:

Script alphafix = new Script();

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.