Category Archives: Javascript

Bootstrap Datepickers

Here is a quick code snippet showing how to initiate a Bootstrap date picker control when elements other than the input are clicked.

Javascript And ASP.Net Helpers Are Here To Help

Javascript is an often overlooked language within the development community. A lot developers steer away from Javascript because it is synonymous with client-side programming and design. But it does not have to be scary. Here are a few pointers on how to use Javascript as a helper to C# and MVC.

Javascript and JQuery

JQuery’s catch phrase on their website is “The write less, do more, Javascript library”. And that sums it up perfectly. JQuery is a library that sits on top […]

Filter Your Content With Javascript

When working with large sets of data, it can be difficult to find smaller sets of data that match specific criterion. Use the Jquery filter method to return a smaller array of data to work with.

JSON Action Results and Internet Explorer

I had an issue recently where my MVC action was returning some JSON as a result. The issue occurred when Internet Explorer (possibly only earlier versions) got the JSON response, it thought the response should be delivered to the browser. This is quite undesirable.

JQuery JSON parse error – “Uncaught SyntaxError Unexpected Token u”

I was working on a bootstrap modal that posted the form via AJAX. On submit, I checked for the success/failure of the form post, then (if successful) hide the modal. Otherwise, leave the modal and display an error Toastr message.

But I had this JQuery error that I couldn’t quite trap and it was driving me bananas.

After some reading (quite a lot of reading), I found this JQuery bug report – While there is a debate as to whether the […]

Image Placeholders – Save Time Creating Sample Images

I recently stumbled across a great resource relating to images. We’ve all been in the situation where we need to mock up a page quickly. To make the page appear more realistic, it really should have some neatly aligned and floated images or different shapes and sizes. Until now, I would jump into Paint.Net and mock up some images of the required sizes, save them, import them into the project and reference them in the code. will change all that.