added ajax request code and tested in local host browser