how to fix javascript void 0 error in google chrome