// This usually happends because you're trying to split something that isn't // a string, just put .toString() before // example:
var string = document.location;