Ajax part added

test cases missing, will add soon
oh, yes.. i think i need to add error case after success. i tried to handle the error..