The much more I find out the a lot more excited I get about how slick it's and so straightforward to work with. It can genuinely give some rally cool features to your site as well as give a good way for me as a programmer to circumvent some tasks that can be hard to accomplish using server side programming.

Today I was presented using a process on an current internet site using the DotNetNuke publishing platform. The consumer has designed a form employing a module inside the framework. The kind is used to order some stuff and the visitor has to click quite a few verify boxes based on what they wish to order. There is certainly also ha a bunch of pages with data concerning the items. Every web page includes a direct hyperlink on i to acquire towards the order web page. Now, when the visitor clicks this link the check box for that distinct item ought to be checked, simply to make issue simpler.

I have no intention on going in towards the framework to alter the behaviour from the module so I thought I'd attempt some jQuery on this.

Initial off the only thing I truly know is the fact that the order kind will have a header like this "<h1>Order form</h1>" (potentially the module can exist on several pages, even several times around the same web page) and that the item page may have the item name within the url, which is also the text on the verify box.

My thought was that very first verify when the order kind exist around the web page by looking for the header then check the referrer url and evaluate this towards the verify box names. This is the code:

$(document).ready(function()
{
if($("h1:contains(Order form)"))
{
setOrderCheckboxes();
}
});

// Automatically set checkboxes if the visitor previously viewed
// a page named the same as the checkbox
function setOrderCheckboxes()
{
$("input[type='checkbox']").each(function()
{
// The text element is always a sibling directly following the checkbox
var checkboxName = $(this).next().text();

// DNN url replaces characters in PageName
checkboxName = checkboxName.replace(" ", "").replace("-", "");

if(document.referrer.indexOf(checkboxName) != -1)
{
$(this).attr("checked", true);
}
});
}

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.