So A < a, which means if you use the sort() function and your array contains elements starting with upper and lowercase then the uppercase will appear first, i.e.: Art, ASP.NET, LawDeed, LINQ will appear as: ASP.NET Art LawDeed LINQ To get this working correctly you need the following function: charOrdA: function(a, b) { a [...]
Continue reading about JavaScript alphabetical sorting (A is less than a)
JQuery, prototype, scriptalicious, moo tools and Microsoft Ajax are all JavaScript libraries that encapsulate common functionality, or rather commonly repeated tasks, into a re-usable form. One such example is accessing DOM elements. Usually you would type document.getElementById to get to a div element for example, which also implies for each element you access you have [...]
Continue reading about Choosing a JavaScript library/strategy
Earlier today I posted a blog about using a generic handler (.ashx) to upload a file to a web server, and in the back of my head I wanted to use it somewhere neat and special, and I also want to find the most reliable and working version. And I also want to learn what [...]
Continue reading about Mimicking AJAX behaviour with Generic Handler (.ashx) file uploader
When I started my career about 5 or so years ago I didnt know much about JavaScript, but I knew something about object oriented analysis and design. OOAD in this case was the classical approach to OO where an object is an instance, which means that each thing or object that you create in a [...]
So during the week I did a lot of JavaScript and the thing that I found most, what shall I say, mindshiftable, is that you cannot think in the classical OOP way with JavaScript, as you do with C#. JavaScript does everything in functions, and everything within JavaScript is prototypical. Inheritance is prototypical, everything is [...]
Continue reading about Understanding JavaScript from a C# developer’s perspective
What is the idea behind unobtrusive JavaScript? What makes JavaScript unobtrusive? Does it mean removing any onlclick events in your markup and handling those click events with an approach as provided with jQuery? With jQuery its very (extremely) easy to traverse between DOM elements and its even easier associating events to elements and executing them. [...]
Continue reading about Unobtrusive JavaScript and a Session-less shopping cart
There are a couple of design techniques that I have not spent enough time to learn, or master. Web design is not one of my strong abilities, but it is a skill that I believe you can learn and become good at. As with a lot of things good web designs can be created by [...]
This article and its contents are based on the articles on the W3C Website, and is a great place to start learning. AJAX uses the XMLHTTPRequest JavaScript object to communicate directly with the web server and has three important properties: the onreadystatechange property the readystate property the responsetext property It’s important to note that the [...]
I downloaded the LiveValidation script recently and I realised after implementing it on a webpage I did not understand how it interacts with a PHP or ASP.NET application and it got me thinking that maybe I need to just try and understand how server-side and client-side code interacts with JavaScript. What is AJAX? I know [...]
Here’s the thing right, I really want to create a nice contact form for my website, but I also want to make sure that the form accepts the right type of information. For this I need some JavaScript and of late I have been reading a lot about JavaScript libraries such as jquery, mootools and [...]
Continue reading about AJAX form validation – LiveValidation