开发者

Tabber.js script not running in DotNetNuke

开发者 https://www.devze.com 2023-02-17 07:01 出处:网络
I have designed an HTML page that uses the tabber.js script to create tabs on my page. It works fine in a basic html page when ran in VS. However in DotNetNuke, I put the div tags which represent the

I have designed an HTML page that uses the tabber.js script to create tabs on my page. It works fine in a basic html page when ran in VS. However in DotNetNuke, I put the div tags which represent the tabbed pages into the content using the text editor, and it doesn't work. I can't put this on a site for you to test because it is on local host.

To get the tabber.js to be included in my page, I entered this code in my skin's ascx page:

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);        
 }

When I view the source in firefox, the script tag does show in the page and when I click on the script link, it does show the tabber.js script so it can be found. I've tried to put an alert() call into tabber.js to see if it will fire and it does not. Any ideas?

Edit:

Below is the html code that I'm putting in my text editor within dotnetnuke. After rebooting my machine, the code is now firing but not changing the div tags to resemble tabbed viewing. I've also put these div tags directly inside of my skin (ascx) control but that doesn't make any difference. By the way, the tabber.js is open source and the code can be found here: 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>


Is the Control Panel visible and in Iconbar mode? If it is, try to switch it to Classic mode.

Tabber.js script not running in DotNetNuke

I have seen multiple javascript failures that are fixed when the panel is in classic mode, or not visible at all (no page-level write privileges).

The hard thing is that this problem does not usually show up as an error in the browser's error console. Right now I'm witnessing this with jQuery dropdown-check-list in IE9, FF4, and latest Chrome 11. The plugin does not work, there is no error message, and I haven't debugged enough to know a root cause.

0

精彩评论

暂无评论...
验证码 换一张
取 消