Monday, November 24, 2008

Enable AJAX On SharePoint feature

I was searching for a tool to quickly enable AJAX on SharePoint site collections, but I was unable to find something like that, so I decided to create one. I named it Enable AJAX On SharePoint. This tool is just a feature on the site collection scope which make the appropriate modifications in the site collection web.config to enable AJAX.

You could find it here:


For deployment it is used WSPBuilder so you have to start the setup.exe file to install it. To use it just enable / disable the feature at the site collection level and the AJAX will be enabled / disabled for this scope.
This tool is free for any purpose.
If you have some improvements for it feel free to change it. I'll appreciate if you'll send me an email with the modifications (or request for modifications).

P.S. do not forget to rewrite (at the page level) the _spOriginalFormAction and _spSuppressFormOnSubmitWrapper in order to use AJAX in that aspx page. Just add this script on every page that uses AJAX (or in the masterpage file):

<script type="'text/javascript'">
_spOriginalFormAction = document.forms[0].action;
_spSuppressFormOnSubmitWrapper = true;
</script>


The code for this feature is here:


Enjoy it!