Weather application only runs properly once or after page refresh

Thanks for that, but it did not help, Infact, it does not seem to be working at all, while it did yesterday with the same code. I too believe too that the e.preventDefault is the culprit here.