JavaScript: remove leading and trailing spaces

Ramble Preamble Hot on the heels of finishing off one of my non-JavaScript mini projects – the reason why there’s a lull of late on this blog – I’d come to the weary conclusion that somethings you just need JavaScript for. The project in question is a web port of a simple csv convertor desktop […]

AngularJS To do App – Part IV

Following from the previous entry, there was just one feature remaining for the rudimentary functionalities of our app: Check of an item I added an input checkbox to the ngRepeat construct. And after some fumbling around and going through some forums + angularjs developer documentation, I managed to apply a simple class styling to the […]

AngularJS To do App – Part III

So out of the remaining features, what should I pick next to work on, hmm let me see. Edit an item, sure why not. Why not indeed. Check of an item Edit an item Delete an item It turned out more difficult than I had (not) anticipated. Not the most crucial feature but sure. Thought […]

AngularJS To do App – Part III

So continuing on and upwards, what every To do list should have, in no particular order are the following: Check of an item Edit an item Delete an item Incidentally the first thing that came to mind was the delete function (only when I had that did the rest occur, which arguably are more important […]

AngularJS To do App – Part II

When we last left, our intrepid developer in the making, he had had completed the shell and basic setup of his AngularJS app. Lets see what he’s upto this week… The To do list has so far taken shape and the basic structure and logic was coded. However adding an item presented two issues:  We […]

Hoisting in JavaScript

Everyone’s heard the all too familiar, JavaScript is an interpreted language spiel. That’s only partly true. Certain instances  can catch unwary developers out about this idiosyncratic run-time behaviour. When a JavaScript engine parses a code file, a global execution environment called the execution context is created. This occurs before the file is executed where functions, […]

JSON and JavaScript Objects

JavaScript Object Notation (JSON) is the lightweight alternative to tag laden XML used as data exchange format. What it is, precisely, is a method of data transmission based on JavaScript’s object literal syntax. JavaScript objects are containers which store key value pairs of attributes, functions and other objects of the following appearance: var anObject = […]

HTML5 enhancements

Now it’s been some time since HTML5 came on the scene. It’s shiny new glean has been replaced with a well worn veneration and stability. Although it’s made some marked improvements over its predecessors in terms of not requiring laboured attributes or overly strict syntax, one of its tenets means a certain level of backward […]

Get started using web API’s – Luas Forecasting API Part Three

After much struggles, see the previous entry for the history up til now, the responseText message was successfully parsed and the information populated on the page: Some of the pitfalls: Response message was a string which wouldn’t yield to any XML extraction methods. That was sorted once parsed to XML. (Response methods for XML didn’t […]