jQuery / MVC and TextArea Length Validation

I came across this issue today, and actually surprised I have not had to resolve this problem earlier. When validating a textarea on the client side with jQuery unobtrusive validation (for length) you have to be conscientious about how JavaScript deals with carriage return/line feed characters in comparison to the posted values to your controller.…

Read this article

JavaScript Patterns–Benefits

A number of JavaScript patterns exist. Some of the prevailing ones are listed with the benefits provided. Closures, Prototpe Pattern, Module Pattern, Revealling Module Pattern, Revealing Prototype Pattern. If you only have time for one, take look at the last one in this list.…

Read this article

Using JsRender with JavaScript and HTML

JsRender is a JavaScript library that allows you to define a boilerplate structure once and reuse it to generate HTML dynamically. JsRender brings a new templating library to HTML5 development that has a codeless tag syntax and high performance, has no dependency on jQuery nor on the Document Object Model (DOM), supports creating custom functions and uses pure string-based rendering. JsRender is a small fast implementation doing pure string-based rendering with improved performance and with no DOM dependency. If wanting more look for JsViews. JsViews takes DOM content rendered by JsRender (using simple innerHTML insertion) and activates it to provide: Equivalent DOM integration features to jQuery Templates, and Full integration of Data Linking.…

Read this article

Json–know more

Why Json? 1.) lightweight data-interchange format 2.) Easy for humans to read and write 3.) Easy for machines to parse and generate 4.)JSON can be parsed trivially using the eval() procedure in JavaScript 5.) JSON Supports: ActionScript, C, C#, ColdFusion, E, Java, JavaScript, ML, Objective CAML, Perl, PHP, Python, Rebol, Ruby, and Lua.…

Read this article

Namespace your JavaScript

Namespace your JavaScript...really? yes read on for a good technique to improve your scripting. Namespacing is a programming technique that protects your variables from other programs. Remember in a web page, all functions and variables share the same global namespace - that of the Window object. By putting your JavaScript in your own namespace you clearly ensure there are no conflicts with the global methods as well as other advantages.…

Read this article