This article talk about the host level settings and how the work, then we will discuss the developer implementation of jQuery. If you looking for DNN hosting, you can always consider ASPHostPortal. At ASPHostPortal you can get a professional DNN installation with your DNN Hosting account. You can always start from our Portal ONE hosting plan (from @$5.00/month) to get this application installed on your website. So, why wait longer?

Host Settings

To provide jQuery support in DotNetNuke a new set of options was added to the “host settings” section of the installation.

jQuery Settings:
- Installed jQuery Version
- Use jQuery Debug Version
- Use Hosted jQuery Version
- Hosted jQuery URL

As you can se here these are very simple options.  The first is for informational purposes only and identifies the currently installed version of jQuery that is LOCAL to the DotNetNuke installation.  By default the minified version of jQuery is used to help with performance, however when debugging script the minified version can make the task quite difficult.  This is where the “Use jQuery Debug Version” comes in handy, especially for those with local development installations.

The last two options provide DotNetNuke site administrators another great option, the ability to use a remotely hosted version of jQuery rather than the local one.  By default this is disabled, but the key advantage here is that as adoption of jQuery grows if more sites use the hosted version individuals will already have jQuery cached and it will not have to be requested on page load when visiting your specific site.  The final option allows the site administrator to select the URL for the hosted service, granting full flexibility in implementation.

As a host user goes, this is all that is needed to configure jQuery, then it is time for the developer to get involved.

Using jQuery as a Developer

Developers will also love this implementation as with a single line of code they can ensure that the needed reference to jQuery is added and they can also be assured that only one reference exists.  To perform this action the following line of code is all that is needed.

DotNetNuke.Framework.jQuery.RequestRegistration()

This will register the jQuery script for the page, the key to remember here is that this value must be set on EVERY page load as the framework does not keep track of which modules need jQuery and which do not.  This is typically the most common stumbling block when working with jQuery.

Otherwise this completes the implementation and you can include jQuery script information in your module’s .js files.  However, there is one important compatibility item to consider when it comes to jQuery, DotNetNuke, and Microsoft’s ASP.NET AJAX.  And that is the use of the $() shortcut, it is strongly recommended that rather than using the $() syntax that you use jquery() to ensure the highest level of compatibility with the framework, other modules, and other javascript that exists on the page. 

Example Implementation

So now this begs to answer the  most important question, what should we use jQuery for?  Well this is a question that isn’t easily answered by just saying everything.  But the key is that anything you are looking to do client side, MIGHT have some benefit of using jQuery rather than standard JavaScript.  This is due to the jQuery effects and the extra bonus items that it offers when it comes to working with content.  For example IowaComputerGurus Inc offers an Expandable Text/HTML module for DotNetNuke that just recently released support for jQuery for the expanding and collapsing actions.  jQuery provided a much more user friendly expansion and collapsing process with a “slow” show and hide process.

The code they use to show and hide elements is shown below.

function ShowOrHideContentJquery(idOfElement, itemId)
{
    //Create paths
    expand = jQuery("#ICG_ETH_EXPAND_" + itemId);
    collapse = jQuery("#ICG_ETH_COLLAPSE_" + itemId);

    //do the magic
    listing = jQuery("#" + idOfElement);
    if (listing.hasClass('hideContent')) {
        //Currently hidden, show with jquery
        listing.show('slow').removeClass('hideContent');

         //Setup expand collapse
         if (expand != null) {
          expand.addClass('hideContent');
          collapse.removeClass('hideContent');
        }
 }
    else {
        //Show
        listing.hide('slow').addClass('hideContent');

         //Setup expand collapse
        if (expand != null) {
           expand.removeClass('hideContent');
           collapse.addClass('hideContent');
        }
    }
}

It is very simple code, but uses some fun jQuery items such as; removeClass, addClass, show, and hide.  These options are all quick and easy ways to manipulate the HTML Document Object Model to get intended effects with little programming on the developers side of things.  This is just one simple example of jQuery in action within DotNetNuke. 

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they're really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization - as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal's top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients' critical sites and services.