0

tabber.js スクリプトを使用してページにタブを作成する HTML ページを設計しました。VS で実行すると、基本的な html ページで正常に動作します。しかし、DotNetNuke では、タブ付きページを表す div タグをテキスト エディターを使用してコンテンツに挿入しましたが、機能しません。これはローカル ホスト上にあるため、テスト用にサイトに配置することはできません。

tabber.js をページに含めるために、スキンの ascx ページに次のコードを入力しました。

protected override void OnPreRender(EventArgs e)
{
    string scriptTag = "<script type=\"text/javascript\" src=\"/DotNetNuke/Portals/_default/skins/myBasicSkin/js/tabber.js\" ></script>";
    LiteralControl headerscript = new LiteralControl();
    headerscript.Text = scriptTag;
    Page.Header.Controls.Add(headerscript);
    Page.Controls.Add(headerscript);
    base.OnPreRender(e);        
 }

Firefox でソースを表示すると、スクリプト タグがページに表示され、スクリプト リンクをクリックすると、tabber.js スクリプトが表示されるので、見つけることができます。alert() 呼び出しを tabber.js に入れて、起動するかどうかを確認しようとしました。何か案は?

編集:

以下は、dotnetnuke 内のテキスト エディターに入力している html コードです。マシンを再起動した後、コードが実行されるようになりましたが、div タグがタブ表示のように変更されません。また、これらの div タグをスキン (ascx) コントロール内に直接配置しましたが、違いはありません。ちなみに、tabber.js はオープン ソースで、コードはhttp://www.barelyfitz.com/projects/tabber/tabber.jsにあります。

<div class="tabber">
    <div class="tabbertab">
    <h2>Guests</h2>
    <div class="content">
    <div class="two-column">
    <h3>Welcome!</h3>
    <p>Our great joy is knowing and serving Christ. We desire to
    love Him with all our hearts and glorify Him in all we do. The
    purpose Our great joy is knowing and serving Christ. We desire to love Him with all our
    hearts and glorify Him in all we do. The purpose of Grace Life Church is to
    glorify God by obediently making and equipping disciples of Christ, in the
    Shoals and throughout the world, by the power of the Spirit."
    </p>
    <ul>
        <li><a title="Live Streaming, Service Archives, etc." href="http://www.gracelifeshoals.org/worship/listen_online">Listen Online</a></li>
        <li><a title="What we believe" href="http://www.gracelifeshoals.org/about_us/statement_of_faith">Our Statement of Faith</a></li>
        <li><a title="What to expect when visiting Grace Life" href="http://www.gracelifeshoals.org/worship/what_to_expect">What To Expect </a></li>
    </ul>
    </div>
    </div>
    </div>
    <div class="tabbertab">
    <h2>Members</h2>
    <div class="content">
    <div class="two-column">
    <h3>Grace Life Family</h3>
    <p>Members are encouraged to use this site as a resource and
    encouragment for their Christian walk. Check here regularly for updates
    and information regarding the ministries of Grace Life Church.</p>
    <h3>Check out these helpful links:</h3>
    <ul>
        <li><a href="http://www.gracelifeshoals.org/news_and_events">News &amp; Events</a></li>
        <li><a title="Information about Small Groups" href="http://www.gracelifeshoals.org/life/small_groups">Small Groups<br />
        </a></li>
        <li><a title="The evidence is in the home" href="http://www.gracelifeshoals.org/..life/family_discipleship">Family Discipleship</a></li>
        <li><a href="http://www.gracelifeshoals.org/life/worship_and_music">Worship &amp; Music</a></li>
    </ul>
    </div>
    </div>
    </div>
    <div class="tabbertab">
    <h2>Churches</h2>
    <div class="content">
    <div class="two-column">
    <h3>The Local Church</h3>
    <p></p>
    <p>God has entrusted the ministry of the Gospel to the
    local church. At Grace Life, we are striving not to be a <em>great</em>
    church but a <em>true </em>church. Believing the Bible to be God&rsquo;s
    inspired, inerrant, and infallible Word, we hold it as our sole rule and
    authority.
    </p>
    <h3>Check out these helpful links:</h3>
    <ul>
        <li><a title="Visit Anchored in Truth Ministries" href="http://www.anchoredintruth.org/">Anchored in Truth</a></li>
        <li><a title="Learn about upcoming conferences" href="http://www.anchoredintruth.org/equipping/conferences_and_seminars">Conferences </a></li>
        <li><a title="Visit the Anchored in Truth Store" href="http://store.anchoredintruth.org/">Purchase Resources</a></li>
        <li><a title="Watch or Listen online" href="http://www.gracelifeshoals.org/worship/listen_online">Listen Online</a></li>
        <li><a title="Contact Us" href="http://www.gracelifeshoals.org/about_us/contact_us">Contact Us</a></li>
    </ul>
    <p>&nbsp;</p>
    </div>
    </div>
    </div>
</div>
4

1 に答える 1

0

コントロール パネルは表示されていて、アイコンバー モードになっていますか? その場合は、クラシック モードに切り替えてみてください。

ここに画像の説明を入力

パネルがクラシック モードの場合に修正されるか、まったく表示されない (ページ レベルの書き込み権限がない) 場合に修正される複数の JavaScript エラーを見てきました。

難しいのは、この問題は通常、ブラウザーのエラー コンソールにエラーとして表示されないことです。現在、IE9、FF4、および最新の Chrome 11 の jQueryドロップダウン チェック リストでこれを確認しています。プラグインは機能せず、エラー メッセージも表示されず、根本原因を知るのに十分なデバッグが行われていません。

于 2011-06-06T18:39:30.060 に答える