I need to check to see if a variable is null or has all empty spaces or is just blank (\"\").
I have the following, but it is not working:
var addr;
You can use if(addr && (addr = $.trim(addr)))
if(addr && (addr = $.trim(addr)))
This has the advantage of actually removing any outer whitespace from addr instead of just ignoring it when performing the check.
addr
Reference: http://api.jquery.com/jQuery.trim/