aboutsummaryrefslogtreecommitdiffstats
path: root/apps/bookmarks/js/addBm.js
blob: 7c914f2338af8274e740cd666e6e4ada96603c11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$(document).ready(function() {
	$('#bookmark_add_submit').click(addBookmark);
});

function addBookmark(event) {
	var url = $('#bookmark_add_url').val();
	var title = $('#bookmark_add_title').val();
	var description = $('#bookmark_add_description').val();
	var tags = $('#bookmark_add_tags').val();
	$.ajax({
		url: 'ajax/addBookmark.php',
		data: 'url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&description=' + encodeURI(description) + '&tags=' + encodeURI(tags),
		success: function(data){ 
			location.href='index.php';
		}
	});
}