Add Javascript self calling function post