Javascript Injection Safety

Tried to make it injection safe and made it run a get request instead of loading the page upon posting.