Google Bar Chart Sample Script

Google provides a very good chart package which allows you to integrate with your website via JavaScript. You just need to feed the values and it will generate the chart for you. I have just generated a sample bar chart script using Google Charts. Check out the Google Bar Chart Sample code here

How to trim a string of whitespace using a function in JavaScript

Following is a custom JavaScript function which will trim whitespace characters from your string variable. This function can also be used in your validation functions to check whether the user has deliberately entered whitespace characters or not. … function trimstr(sString) { while (sString.substring(0,1) == ‘ ‘) { sString = sString.substring(1, sString.length); } while (sString.substring(sString.length-1, sString.length) … Read more