I\'m working on a bookmarking function where the user clicks on a jQueryui button and certain information is sent to the database. But I\'m not using a form, because there i
from the documentation of jQuery.ajax()
Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests.
If you do not know what to put for the data, probably you should remove that option? In your controller function addBookmark(), you can reduce the code by remove the if check. Try this and see if it works for you.