Alphafix for IE6"
From Documentation
(Created page with '{{ZKClient-sideReferencePageHeader}} =Version History= {{LastUpdated}} {| border='1px' | width="100%" ! Version !! Date !! Content |- | | | |}') |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ZKClient-sideReferencePageHeader}} | {{ZKClient-sideReferencePageHeader}} | ||
− | = | + | IE6 failed to render a PNG with alpha transparency correctly. Please refer to [http://homepage.ntlworld.com/bobosola/index.htm here] for more information. |
− | + | ||
− | + | ZK provides the fix, but you have to turn it on by specifying a JavaScript variable called <javadoc directory="jsdoc" method="IE6_ALPHAFIX">_global_.jq</javadoc> For example, | |
− | + | ||
− | |- | + | <source lang="xml"> |
− | + | <?script content="jq.IE6_ALPHAFIX='.png';"?> | |
− | + | <zk> | |
− | + | <button image="foo.png"/> | |
− | + | </zk> | |
+ | </source> | ||
+ | |||
+ | where <code>.png</code> causes all PNG images to be fixed. If you want to fix certain images, you can do as follows | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <?script content="jq.IE6_ALPHAFIX='more.png|-trans.png'?> | ||
+ | </source> | ||
+ | |||
+ | If <code><?script?></code> doesn't work, you can try using a regular script-component: | ||
+ | <source lang="xml"> | ||
+ | <zk> | ||
+ | <script type="text/javascript">jq.IE6_ALPHAFIX='.png';</script> | ||
+ | <button image="foo.png" /> | ||
+ | </zk> | ||
+ | </source> | ||
+ | |||
+ | If you prefer to use plain Java instead of ZUL files, you can instantiate a Script component and append it to another component: | ||
+ | <source lang="java"> | ||
+ | Script alphafix = new Script(); | ||
+ | alphafix.setContent("jq.IE6_ALPHAFIX='.png';"); | ||
+ | parent.appendChild(alphafix); | ||
+ | </source> | ||
+ | |||
+ | {{ZKClient-sideReferencePageFooter}} |
Latest revision as of 11:49, 25 July 2022
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';"?>
<zk>
<button image="foo.png"/>
</zk>
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:
<zk>
<script type="text/javascript">jq.IE6_ALPHAFIX='.png';</script>
<button image="foo.png" />
</zk>
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();
alphafix.setContent("jq.IE6_ALPHAFIX='.png';");
parent.appendChild(alphafix);