diff options
Diffstat (limited to 'phpfspot.js')
-rw-r--r-- | phpfspot.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/phpfspot.js b/phpfspot.js index ed19372..4f8fd52 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -3,3 +3,36 @@ function showImage(id) content = document.getElementById("content"); content.innerHTML = HTML_AJAX.grab('rpc.php?action=showphoto&id=' + id); } + +function Tags(mode, id) +{ + if(mode == "add") { + // add the tag to users session + HTML_AJAX.grab('rpc.php?action=addtag&id=' + id); + } + else if(mode == "del") { + // del the tag from users session + HTML_AJAX.grab('rpc.php?action=deltag&id=' + id); + } + else if(mode == "reset") { + HTML_AJAX.grab('rpc.php?action=resettags'); + } + + refreshAvailableTags(); + refreshSelectedTags(); + +} + +function refreshAvailableTags() +{ + // update available tags + content = document.getElementById("available_tags"); + content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_available_tags'); +} + +function refreshSelectedTags() +{ + // update selected tags + content = document.getElementById("selected_tags"); + content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_selected_tags'); +} |