loadJS() returns a string instead of echoing