Create an Extensible Object in Javascript

There’s a whole mess of ways to accomplish this (see this article). Obviously, YMMV, but I chose this route for one simple reason: it makes sense to me. Anyhow, here’s a method of creating an extensible object in Javascript. var theObject = function (config) {   this.exProperty = “”;   this.exFunction = …

WordPress Disqus Recent Comments Widget Using Pure Javascript (Updated)

WpDisqusRc, or WordPress Disqus Recent Comments Widget, is a small script that you can drop into a Text Widget in WordPress. With just a few options, you can display the most recent comments for your Disqus-enabled site! UPDATE 12-17-2012: Version 0.3 – Added fade in/out animation to popup (Webkit browsers …

SlidingPane: Slide Page to Reveal Content Underneath Using HTML5 (Updated)

SlidingPane is a super simple script that allows you to slide an entire page or a section of a page to reveal content underneath. It was built as a self-contained component using HTML5 with no dependency on any Javascript library. Project Background First off, check out the demo here! UPDATE …

How to Specify a Filename For Your Exported Reports in Microsoft Dynamics CRM 2011

As you probably already know, there’s no built-in way to specify the filename of a report you want to export to PDF, Excel, Word, etc. Then a colleague pointed me to this article.  First off, the code for the below solution can be downloaded here. This one took a while …

Detect Browser, Platform, and Touch Capability Using Javascript

Here’s a method of detecting which browser you’re using and whether you’re on a mobile or desktop platform: <script type=”text/javascript”>   <!–   var userAgent = navigator.userAgent || window.navigator.userAgent;   var nav = navigator || window.navigator;   var isDesktop = nav[‘platform’].match(/(Mac|Win|Linux)/) && !userAgent.match(/Android/);   if (isDesktop) {     alert(“You’re on a Desktop!”);   };   –> </script> Need …

iOS6 Removed Mouse Events in Safari/UIWebView? (Updated)

UPDATE 10-08-2012: Here’s a blog entry on how to determine if the device you’re on has touchevents enabled. Note that most Javascript libraries/frameworks should already have some sort of detection for this built in. My demo for using Cubiq.org’s SpinningWheel control stopped working on iOS6. The issue was that I …

Dynamically Load Javascript Files Using XHR

It probably won’t be often, but sometimes you may find yourself having the need to load Javascript dynamically using XHR.   To name a few use cases: Developing a plugin architecture for an HTML5 application. In order to extend your application’s functionality. Load certain Javascript depending the browser environment. A …

CSS Matrix3d Z coordinate and Chrome Issue

I was playing around with Wink Toolkit’s Tag Cloud control and came across an interesting issue with Chrome and the CSS3 matrix3d transform function. In order for the z coordinate to work properly in the matrix3d parameters, you’ll need to set the parent element’s -webkit-transform-style property to preserve-3d. The following example …