Basics of javascript Templating


Being the 100th post, i felt i should share some of my most useful learning here. And i could not think of anything better than javascript Templating. There are quite a handful of such templating tools available online(JsRender, Underscore.js, Moustache.js...). Feel free to run a jsPerf on the tool you wish to use and then … Continue reading Basics of javascript Templating

Detect multiple key press in javascript for your website


Many a times we end up in situations where in our clients are windows app migrants to web. And they could not let go off the "hotkey" concept. Let's say "Ctrl + S" or "Alt + R" to perform save or submit operation on a website. The options are endless. A scalable code that you … Continue reading Detect multiple key press in javascript for your website

Combining Multiple attributes in jQuery


Below are some of the code snippets available in jQuery for you to combine your multiple lines of code: Combining multiple css properties or element attributes: Statement: Set the width and height attributes for a table with id=mytable $("#mytable").attr({width:'50px',height:'40px'}); Statement: Set the css properties of width, height, background-color for a div with id=mydiv $("#mydiv").css({width:'50px',height:'40px',background-color:'#F2F2F2'}); Combining … Continue reading Combining Multiple attributes in jQuery

SharePoint Client Object Model (ECMAScript) #2 – Update Web Properties


SharePoint Client Object Model (ECMAScript) provides the capabilities of SharePoint Server Object capabilities at the client side. In this tutorial, let me show you how you can play around with the Client Object Model through IE Developer Toolbar how to update Web properties. Check the screenshot below, to know what we are trying to achieve … Continue reading SharePoint Client Object Model (ECMAScript) #2 – Update Web Properties

SharePoint Client Object Model (ECMAScript) #1 – Get Context Object


SharePoint Client Object Model (ECMAScript) provides the capabilities of SharePoint Server Object capabilities at the client side. In this tutorial, let me show you how you can play around with the Client Object Model through IE Developer Toolbar. Check the screenshot below, to know what we are trying to achieve here: Below is the function … Continue reading SharePoint Client Object Model (ECMAScript) #1 – Get Context Object

Best Practices for jQuery Developers


Following are some of the best practices that you could follow while working with jQuery: Plugins: Please avoid unnecessary use of plugins If a plugin is being used, respect the authors work and ensure that the plugin file is reused with the license comments intact If you are writing a reusable functionality in the code, … Continue reading Best Practices for jQuery Developers

Dialogs in SharePoint 2010 – Part 1


Most of us SharePoint developers when posed with a question of showing content in a popup, we tend to make use of window.open() and window.showModalDialog(). Many of us forget about the fact that SharePoint 2010 itself has modal dialog to perform this operation. In this part we will see how to setup a modal popup … Continue reading Dialogs in SharePoint 2010 – Part 1