Problem: onClick runs automatically in xmlhttprequest