Simple and easy ajax function in pure javascript