mirror of
https://github.com/owncloud/bookmarks.git
synced 2024-12-04 08:24:10 +01:00
17 lines
544 B
JavaScript
17 lines
544 B
JavaScript
|
$(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';
|
||
|
}
|
||
|
});
|
||
|
}
|