@CTDisasterManagement don't use dojo.query globals. Also don't use .trim() as its breaking/not supported in IE8. Please validate code with JSHint.