Added function what post to data in javascript