[wpkg-users] wpkgCreateReport

Pendl Stefan stefan.pendl at haidlmair.at
Fri Sep 4 18:57:34 CEST 2009


Another update to the script, since IE does not support the collapse value of visibility:



<script type="text/javascript" language="JavaScript">
<!--
    function HideState(StateClass) {
        var TRarray = document.getElementsByTagName('tr');

        for ( var i = 0; i < TRarray.length; i++ ) {
            if ( TRarray.item(i).className.match(StateClass) ) {
                if ( TRarray.item(i).style.visibility.match(/collapse|hidden/) ) {
                    TRarray.item(i).style.visibility = "visible";
                } else {
                    if ( navigator.appName.match(/Microsoft Internet Explorer/) ) {
                        TRarray.item(i).style.visibility = "hidden";
                    } else {
                        TRarray.item(i).style.visibility = "collapse";
                    }
                }
            }
        }
    }
// -->
</script>

So users of IE will not have the full advantage, since the rows are only hidden and still occupy the space they used.

Firefox and other browsers will just show the rows not collapsed, so the table is only as high as the rows shown.



---

Stefan





More information about the wpkg-users mailing list