I can't get Internet Explorer to properley refresh my ColdFusion page

筅森魡賤 提交于 2020-01-06 13:27:29

问题


I have made this nice little table:

testPage.cfm:

<html>

<head>
    <title>Test Page</title>

    <style>
        .blue{
            background:#66CCFF;
            padding: 1px 20px;
        }
        .red{
            background:red;
            padding: 1px 20px;
        }
        .blank{
            background:#FFF;
            padding: 1px 20px;  
        }
    </style>

    </head>
    <body>


        <cfform>
            <cfinput type="checkbox" name="filters" value="blue" checked="yes">  Blue
            <br />
            <br />
            <cfinput type="checkbox" name="filters" value="red" checked="yes">  Red
        </cfform>
        <cfdiv id="content" bind="cfc:TestCFC.displayTable({filters})"></cfdiv>
    </body>
</html>

TestCFC.cfc:

<cfcomponent>
    <cfscript>


        remote function displayTable(filters){
            var html = "";
            var data = ArrayNew(1);

            data[1] = 1;
            data[2] = 2;
            data[3] = 3;
            data[4] = 4;

            html = html & "<table>";
            for(row = 0; row < 4; row++){

                html = html & "<tr>";

                for(column = 0; column < 2; column++){
                    html = html & '<td class="' & getCSS(data[row + 1], filters) & '">' & data[row + 1] & '</td>';
                }

                html = html & "</tr>";
            }
            return html;

        }

        private function getCSS(value, filters){

            if(isIn("blue", filters) and value LTE 2)
                return "blue";  
            else if(isIn("red", filters) and value GTE 3)
                return "red";
            else 
                return "blank";
        }

        private function isIn(item, list){
            var array = ListToArray(list);

            for(ndx = 1; ndx LTE ArrayLen(array); ndx += 1)
                if(array[ndx] EQ item)
                    return True;
            return False;   
        }

    </cfscript>
</cfcomponent>

this works fine in FireFox but not so well in Internet Explorer, (hint: to get it to respond in IE you have to click an additional time somewhere on the screen)

IE version 7.0.6002.18005 ColdFusion 9


回答1:


I found my own answer. Change

<cfdiv id="content" bind="cfc:TestCFC.displayTable({filters})"></cfdiv>

to

<cfdiv id="content" bind="cfc:TestCFC.displayTable(filters={filters@click})"></cfdiv>

here's the post that got me pointed in the right direction.



来源:https://stackoverflow.com/questions/7907745/i-cant-get-internet-explorer-to-properley-refresh-my-coldfusion-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!