通过JQuery升级而损坏的Tabs Ajax内容WRONG_DOCUMENT_ERR [英] Tabs Ajax content broken by JQuery upgrade WRONG_DOCUMENT_ERR

查看:111
本文介绍了通过JQuery升级而损坏的Tabs Ajax内容WRONG_DOCUMENT_ERR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正准备对CodeProject Chrome扩展程序此版本进行一些补充. "http://www.codeproject.com/KB/scripting/CPRepWatchChromeExtension.aspx" target ="_ blank" title ="New Window"> ^ ],我想在此期间我会升级JQuery和JQueryUI核心是最新版本.

原始版本是V1.4.2和V1.8.2(UI),并将它们提高到了V1.5.1和V.8.11.

在扩展程序上,我有一个选项卡控件,其中选项卡1和3是标准标记,选项卡2和4是ajax调用.可以在原始版本上正常运行,但会抛出WRONG_DOCUMENT_ERR: DOM Exception 4错误(仅在Chrome控制台中可见),并且单击时相应的选项卡只是空白.

标签的代码是;

I was preparing to do some additions to by CodeProject Chrome Extension This One[^], and i thought while i am at it i would upgrade the JQuery and JQueryUI cores to the latest versions.

The original versions are V1.4.2 and V1.8.2 (UI) and was taking them up to V1.5.1 and V.8.11.

On the extension, I have a tab control, with Tabs 1 and 3 are standard markup, Tabs 2 and 4 are ajax calls. This works fine with the original versions, but throws an error (which is only visible in the Chrome Console) of WRONG_DOCUMENT_ERR: DOM Exception 4, and the respective tab is just blank when clicked.

The code for the tabs is;

<script type="text/javascript">
    //Initiate the JQUuery tabs
    $(function () {
        $("#tabs").tabs();
    });
</script>





<div id="tabs" style="height: 400px;">
            <!-- Tab Pages -->
            <ul>
                <li><a href="#tabs-1">Reputation Points</a></li>
                <li><a href="repgraph.html">Reputation Graph</a></li>
                <li><a href="#tabs-3">Options</a></li>
                <li><a href="about.html">About</a></li>
            </ul>
            <!-- Tab 1 Rep Points -->
            <div id="tabs-1" style="padding-left: 5px">
                ..... tab content removed....
            </div>
            <!-- Tab 2 Graph ; Note: This does not require a section as it is a link URL in tab definition above-->
            <!-- Tab 3 Options -->
            <div id="tabs-3" style="padding-left: 5px">
                ..... tab content removed....
            </div>
            <!-- Tab 4 About ; Note: This does not require a section as it is a link URL in tab definition above-->
        </div>



参考页面的标记,例如about.html页面(标签4)是;



The markup for the reference page, e.g. the about.html page (Tab 4) is;

<html>
<head>
<title></title>
<link type="text/css" href="css/custom-theme/jquery-ui-1.8.11.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="jquery/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="jquery/jquery-ui-1.8.11.custom.min.js"></script>
<script type="text/javascript" src="js/cpjshelper.js"></script>
</head>

<body bgcolor="#ffcc66">
    <script type="text/javascript">
        _gaq.push(['_trackPageview']);
    </script>
<div style="padding-left: 5px">
    <h3>CodeProject Reputation Watcher Chrome Extension</h3>
    Version: V2.0<br />
    .....rest of html markup removed.....
</div>
</body>
</html>



任何想法都在Jquery版本之间发生了什么变化,因为它确实令人沮丧.我看过JQuery升级指南,没有发现与此有关的任何归因于失败的原因.



Any ideas what has changed between the Jquery versions as its really frustrating. I have had a look at the JQuery upgrade guides and see nothing relating to this that may be attributable to the failures.

Any help or pointers appreciated....i''m lost now!

推荐答案

(function(){
(function () {


( "#tabs").tabs(); }); < /script >
("#tabs").tabs(); }); </script>





<div id="tabs" style="height: 400px;">
            <!-- Tab Pages -->
            <ul>
                <li><a href="#tabs-1">Reputation Points</a></li>
                <li><a href="repgraph.html">Reputation Graph</a></li>
                <li><a href="#tabs-3">Options</a></li>
                <li><a href="about.html">About</a></li>
            </ul>
            <!-- Tab 1 Rep Points -->
            <div id="tabs-1" style="padding-left: 5px">
                ..... tab content removed....
            </div>
            <!-- Tab 2 Graph ; Note: This does not require a section as it is a link URL in tab definition above-->
            <!-- Tab 3 Options -->
            <div id="tabs-3" style="padding-left: 5px">
                ..... tab content removed....
            </div>
            <!-- Tab 4 About ; Note: This does not require a section as it is a link URL in tab definition above-->
        </div>



参考页面的标记,例如about.html页面(标签4)是;



The markup for the reference page, e.g. the about.html page (Tab 4) is;

<html>
<head>
<title></title>
<link type="text/css" href="css/custom-theme/jquery-ui-1.8.11.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="jquery/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="jquery/jquery-ui-1.8.11.custom.min.js"></script>
<script type="text/javascript" src="js/cpjshelper.js"></script>
</head>

<body bgcolor="#ffcc66">
    <script type="text/javascript">
        _gaq.push(['_trackPageview']);
    </script>
<div style="padding-left: 5px">
    <h3>CodeProject Reputation Watcher Chrome Extension</h3>
    Version: V2.0<br />
    .....rest of html markup removed.....
</div>
</body>
</html>



任何想法都在Jquery版本之间发生了什么变化,因为它确实令人沮丧.我看过JQuery升级指南,没有发现任何与失败有关的内容.

任何帮助或指针表示赞赏....我现在迷路了!



Any ideas what has changed between the Jquery versions as its really frustrating. I have had a look at the JQuery upgrade guides and see nothing relating to this that may be attributable to the failures.

Any help or pointers appreciated....i''m lost now!


这篇关于通过JQuery升级而损坏的Tabs Ajax内容WRONG_DOCUMENT_ERR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆