0

I am trying to archive a database entry using .post, but I am getting this error: "Uncaught SyntaxError: Unexpected token ("

I am defintely still in the learning phase of jQuery, so any help is appreciated!

//Archive Table Row
function archiveEntry(id){
   function(){
      if (confirm("Archive Fill #"+id+"?")) {
         $.post('/elevator/scripts/php-inc/archive.php', {id: +id, ajax: 'true' },
         function(){
            $(".row_"+id).fadeOut();
         });
      }
      else {
         return false;
      }
   }
}

Edited by dschuett: n/a

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by dschuett
0

You have a function within a function, which is perfectly valid in javascript, but the inner function is neither called nor necessary.

Purge the inner function wrapper leaving the operative code in the outer function.

The third, innermost (callback) function is fine. Leave it as it is (and debug if necessary).

Airshow

Edited by Airshow: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.