Knockout - Uncaught ReferenceError: Unable to process binding

Published on Oct 27, 2014 by Jamie Munro

If you've used Knockout.js in your project, at some point or another you've probably encountered the following error "Uncaught ReferenceError: Unable to process binding". The most likely cause is a typo somewhere or forgetting to change the context. E.g. you are within a foreach binding and forget to use $parent.

I recently encountered this issue and could not find the typo anywhere. Like most developers in my situation I was getting really frustrated, banging my head against the world looking for answers.

Unfortunately, there is no easy answer to this bug; however, I can suggest an excellent technique that will hopefully help point you in the right direction.

Here is a complete example that creates a table and displays a list of books within the table. There is an unfortunate typo within one of the td data bindings.

Read more >

Tags: Javascript | KnockoutJS | knockoutjs | data binding | debugging

Javascript, the Back Button, and Windows Phone 8 Development

Published on Feb 18, 2013 by Jamie Munro

I recently had the opportunity to begin exploring and toying around with Windows Phone 8 development.

Why you ask?  Why not really, but mostly because I was giving a free phone and it’s an untapped market when it comes to apps.  At this stage it’s not over diluted like the Android and iPhone stores are.  That and of course there is an option to create apps using HTML, Javascript, and CSS – technologies I’ve used and mastered for years!

I actually submitted my first app last weekend – and sadly – it got rejected :(  I was given two reasons; firstly I did set a default application icon, whoops my bad.  Secondly, I didn’t properly handle the back button since there are “multiple pages” in my application.

It took me several hours to finally found the answer so I thought I would share it.  Please note, this feels like a bit of a hack, but I wasn’t able to get the “suggested” solutions working…

Read more >

Tags: Javascript | ASP.NET | c# | JavaScript | Windows Phone | wp8 | windows phone 8

JavaScript: Easy Creation of "Countdown Timers"

Published on Aug 28, 2012 by Jamie Munro

If there is one thing I don't like doing – it's doing the same thing twice or even more!  So I was building an application on the side where I need to have a listing that performs a simple countdown.  At this point I've been lazy and just have it counting down the seconds, but this example would be really easy to update to put a proper countdown of days, hours, minutes, and seconds – and heck if you get really adventurous even weeks, months, and years!

Read more >

Tags: Javascript | setInterval() | JavaScript

Maintaining the back button with AJAX

Published on Dec 28, 2010 by Jamie Munro

Last week I blogged about whether or not you can use too much AJAX on your website.  The short answer was no; with one caveat being that you must not lose the user interaction experience.  In this scenario I'm referring to the back button.  If the user has "felt" like the content changed, they are likely to click the back button to return.  If they do this, it's important for them to "go back" to where they "think" they were and not the last page that was loaded without AJAX!  I've put together a quick example of how to do this.

Read more >

Tags: Javascript | AJAX | CakePHP | JavaScript | jQuery

Facebook Development - Quick and Easy Dialogs

Published on Jun 10, 2009 by Jamie Munro

At my work, whenever we have a link to delete records, we always have a simple Javascript confirm dialog pop-up.  The confirm dialog just does the standard, “Are you sure you wish to delete this record?” with an OK and Cancel button.  If the user clicks cancel, the record is not deleted, if they click OK, the record will be deleted.

If you’ve done some Facebook development, you will notice quickly that the alert() and confirm() functions do not work.  I’ve found this slightly annoying, so I’ve written a very simple Javascript function that let’s me use the nifty dialogs that Facebook provides us.

Read more >

Tags: Javascript | Facebook | confirm() | JavaScript

Drag and Drop with AJAX Example

Published on Feb 14, 2009 by Jamie Munro