added ajax for view page