Colorbox内容未在IE8中更新

时间:2013-04-05 22:12:14

标签: jquery html internet-explorer-8 colorbox

我正在使用Colorbox进行日期弹出,人们一直在跟我说内容没有变化(我在Mac上使用Chrome / FF,所以没有IE)。一旦我在IE8中查看它,我注意到,只要我更改数据库中的值并且Windows内容发生更改,IE8就不会显示它。我在FF或Chrome中没有这个问题。

这是内容(由PHP脚本生成):

<link rel="stylesheet" href="http://mouseware.net/weekendcamping/includes/popupbox/colorbox.css" />
    <script src="http://mouseware.net/weekendcamping/includes/popupbox/jquery.colorbox-min.js"></script>
    <script>
        $(document).ready(function(){
            // Colorbox elements
            $(".inline").colorbox({inline:true, width:"50%", height:"50%"});$(".ajax").colorbox({width:"50%", height:"50%"});$(".ajax_lg").colorbox({width:"75%", height:"75%"});$(".ajax_tall").colorbox({width:"50%", height:"75%"});
        });
    </script>
                <div align="left" style="font-size:8pt;"><a href="http://mouseware.net/weekendcamping/administrator/index.php?option=reservations&act=selectDate&loc=1&height=400&width=400&dsptmpl=1" class="thickbox" style="font-size:8pt; color:#000000;">Location</a> &raquo; Date</div><br />
        <table align="center" cellpadding="2" cellspacing="1" border="0" style="padding:0; margin:0;">
            <tr>
                <th>
                    <div style="font-size:16pt; font-weight:bold;">Select Date</div>
                </th>
            </tr>
                                <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('04/05/2013 - 04/07/2013')">04/05/2013 - 04/07/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('04/12/2013 - 04/14/2013')">04/12/2013 - 04/14/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('04/19/2013 - 04/21/2013')">04/19/2013 - 04/21/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('04/26/2013 - 04/28/2013')">04/26/2013 - 04/28/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('05/03/2013 - 05/05/2013')">05/03/2013 - 05/05/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('05/10/2013 - 05/12/2013')">05/10/2013 - 05/12/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('05/17/2013 - 05/19/2013')">05/17/2013 - 05/19/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('05/24/2013 - 05/26/2013')">05/24/2013 - 05/26/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('05/31/2013 - 06/02/2013')">05/31/2013 - 06/02/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('06/07/2013 - 06/09/2013')">06/07/2013 - 06/09/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('06/14/2013 - 06/16/2013')">06/14/2013 - 06/16/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('06/21/2013 - 06/23/2013')">06/21/2013 - 06/23/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('09/06/2013 - 09/08/2013')">09/06/2013 - 09/08/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('06/28/2013 - 06/30/2013')">06/28/2013 - 06/30/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('09/20/2013 - 09/22/2013')">09/20/2013 - 09/22/2013</a>
                        </td>
                    </tr>
                                            <tr>
                        <td>
                            <a href="#" onClick="$.colorbox.close(); updateEventDate('10/11/2013 - 10/13/2013')">10/11/2013 - 10/13/2013</a>
                        </td>
                    </tr>
                                </table>

通过

从邮件文件中调用它
$.colorbox({href:'popupDate.php', width:'50%', height:'50%'})

我最好的猜测是弹出窗口正在IE中缓存,因此它不会重新生成内容......但我不确定。

我已将colorbox更新为最新版本1.4.15,将jQuery更新为最新版本1.9.1。这些更新都没有带来任何影响。我也尝试将内容放在标签和标签内,但没有帮助。我还尝试将无缓存HTML和PHP代码添加到我的父级和弹出框中......也没有用。

2 个答案:

答案 0 :(得分:0)

尝试删除IE临时文件(缓存)。

这对我有用。

也许您应该为此页面发送一些无缓存标头。

答案 1 :(得分:0)

每次向href参数添加时间戳或其他唯一变量。它会对你有所帮助。

var seconds = new Date().getTime();
$.colorbox({href:'popupDate.php'+seconds});