added ajax logic to Sample18