WebLog

Server-side, client-side, code snippets, scripts, automation, best practices, proven approaches, tips & tricks...

JQuery .onchange issue in IE8

Solution for onchange event in old Internet Explorer versions
0
Apparently IE8 and older versions of IE browsers do not support JQuery onchange event for checkboxes and radio buttons. If you are using this for handling this event, your script will fail, because these events will not be fired on IE8 or older IE. Instead of this you can add handler for onclick event which works fine in pretty much any browser. ...read more

Detecting request from mobile device

Take control over what is and what is not mobile device for your web app
0
Microsoft made is easy to detect whether request to your web application is coming from mobile device or not by adding a property to Request class. Usage of this is Request.Browser.IsMobileDevice. This works pretty fine for most of mobile devices, but this property is based on list of mobile browsers which is configured in .NET framework itself. ...read more

JQuery CDN with fallback strategy

Smart usage of CDN for JQuery and JQuery plugins
0
Content Delivery Network or CDN is really usefull for loading JQuery and especially JQuery UI since it is pretty big script file. They are very ofter reliable, fast and since they can be used on other sites, they might be alrady cached in clients browser if he visited some website which uses the same CDN for JQuery or JQuery UI. There are a lot of CDN providers outhere, but two most common are for sure: ...read more

Dynamic JQuery plugin files load

Improve page load when using multiple JQuery plugins
0
You all probably had to deal with certain js files for JQuery plug-in. Usually developers add reference to a js file in Master page (if using WebForms) on layout view (is using MVC). This practice is not so bad, because you have references maintained in one file, but bad thing is that all js file are being load even if none of then are used on the particular pages. ...read more

JavaScript

read more

Umbraco CMS

read more

.NET

read more

SQL/T-SQL

read more