Ajax post functionality implemented