function setCookie(fileId) { $.ajax({ type: 'post', url: 'ajax/setCookie.php', data: { fileId: fileId } }); }