Change procedure from post() to ajax()