Tag: javascript

  • Showing the Processing/Loading image

    I came across a good code sample while surfing for showing the Loading/Processing  image on the VisualForce Page. You can find it at: http://force.siddheshkabe.co.in/2009/10/displaying-please-wait-ajax-animation.html

  • Error: ‘google’ is undefined in IE8

    While using the Google Api forOrg chart generation I came across the error “‘google’ is undefined” when i was testing it in IE 8 browser. The same code was working fine in Mozilla FireFox . Google the error was not able to find solution.  After lots of searching fixed it by doing a small one character change…

  • Salesforce: SF:INVALID_SESSION_ID

    I was constantly getting exception when I tried to use the “/soap/ajax/15.0/connection.js” in the VF Page. JavaScript throws following exception:- {faultcode:’sf:INVALID_SESSION_ID’, faultstring:’INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session’, detail:{UnexpectedErrorFault:{exceptionCode:’INVALID_SESSION_ID’, exceptionMessage:’Invalid Session ID found in SessionHeader: Illegal Session’, }, }, } The exception was resolved when I added following statement before using the “sforce.connection”…

  • Regex for AlphaNumeric password validation

    Regular Expression for validating the string (?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,20})$ The above RegEx requires at least one digit, at least one alphabetic character, no special characters, and from 8-20 characters in length.

  • JavaScript: Number to Currency format conversion function

    JavaScript for converting string to currency format. https://gist.github.com/prasannadeshpande/91a3212f041fcec3e4f3d9dac5923c89