JavaScript post request like a form submit