How to display current date and time on a webpage using JavaScript

I make a habit of displaying the current date and time on website backoffice panels I develop for clients. The reason being that time is money for clients and they need to always know the time so they can manage it better and prioritize their work accordingly. I use JavaScript to display the date and … Read moreHow to display current date and time on a webpage using JavaScript

How to validate only digits and decimal points in Javascript?

Our company had implemented an online payment form where customers could pay online on the company website against outstanding invoices or any other service. However, the validation on the form regarding the payment amount field was pretty simple as it was just checking whether the customer had input amount in the field or not and … Read moreHow to validate only digits and decimal points in Javascript?

How to customize the style drop down in FCKEditor

One of my clients wanted to use the same CSS classes which were being used on the public website in the FCKEditor so that he could apply the classes in one go while writing the content. Now the Style drop down is populated through the fckstyles.xml in FCKEditor directory root. Its basically an XML file … Read moreHow to customize the style drop down in FCKEditor

Disable Enter key on form

If you need to disable JavaScript on your form then apply the following code in the <head> tag. <!– <script language=”javascript” type=”text/javascript”> function checkEnterkey(evt) { var evt = (evt) ? evt : ((event) ? event : null); if (evt.keyCode == 13) { return false; } } document.onkeypress = checkEnterkey; </script> –>