Monthly Archives: September 2008

JavaScript String.IsNullOrEmpty

I’ve been doing a lot of JavaScript lately and in my JS I’ve been testing if a string is empty, null or undefined.   C# has string.IsNullOrEmtpy and I believe JS should have the same.  I was about to write my on function, but decided … Continue reading

Posted in JavaScript | 3 Comments

JavaScript Generate Guid

function GenerateGuid() {      return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()); }   function S4() {     return (((1 + Math.random()) * 0x10000) … Continue reading

Posted in JavaScript | Leave a comment