I wanted to be able to format numbers to include commas every 3 numbers and then fix them to a certain number of decimals. There are a few different format functions out there and also JQuery plugins, but couldn't seem to find one that did exactly what I wanted, so ended up writing my own. Here's the code for anyone else looking for something that will format numbers to include commas using JQuery:- Code: (function ($) { $.fn.formatNumber = function (seperator, every, ...
(function ($) { $.fn.formatNumber = function (seperator, every,
1) Introduction This is part of a series of blogs. The others are:- 2) A simple .asmx file and calling a function 3) Converting a .asmx file to WCF .svc file I had some time on my hands recently and for one reason or another starting looking into web services and WCF. It was about a week ago and I can’t remember the exact reason why I started, but I thought I’d detail the pitfalls, hair pulling, shouting and swearing moments into a blog to help ...
I had an issue in Firefox where I wanted a <button> element to fire a Javascript function onclick. However, I found in Firefox that the button also performed a submit on the form, which I didn't want. After a little investigation I discovered that the default type for a button element is submit. Apparently a bug in IE prevents it from firing. So, how to fix? Add a type="button" property to your <button> element ...
Updated March 11th, 2009 at 10:19 AM by richyrich