How to stop being directed to admin.php after sending request to admin-ajax.php

As suspected, WordPress was treating the button as type="submit" fixed by doing:

<button type="button" onClick="addProperty()">Add property</button>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)