Friday, December 05, 2008

Dot Net Nuke and Mootools

I really like the Javascript framework Mootools and some of the extensions and such that have been built for Joomla with it. Unfortunately, my company website runs on Dot Net Nuke and it looks like Mootools and Dot Net Nuke don't play well together.

I had a hard time finding any indication in Google searches for this - so I just thought I'd document it here. If I ever get anything with Mootools to work again, I'll post an update. So far it looks like DNN will play nice with Prototype so that may be the route to go if you want to use one of these ever popular Javascript frameworks with DNN.

EDIT: Per R Doom in the comments I checked out what I could do with JQuery. It works well enough with DNN but you've got to over ride $ functions using calling the neato noConflict ():


<html>
<head>
<script src="jquery.js"></script>
<script>
jQuery.noConflict();

// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
jQuery("div").hide();
});

</script>
</head>
<body></body>
</html>


More info here about noConflict.

2 comments:

R Doom - DotNetNuke Consultant said...

jQuery works great with DotNetNuke. The problem you are having with mootools is that the commands start with $( which is conflicting with Microsofts AJAX framework. In JQuery you can use $( or jQuery( so you have to make sure to use the jQuery( style instead of $( so it does not conflict. If Mootools has the equivalent it will be fine.

saratoga said...

R Doom, thanks! I'm going to tinker with JQuery a bit. Also excited to see it being implemented in DNN 5.0!