Set datatype and use AJAX data

Set the type of data send over a POST keepalive and use them in the ajax
request