SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ajax and deleting a list item

    Hi..

    trying out ajax and found scriptaculous which seems to do a nice job..

    The only thing I'm missing is deleting items in a list..

    here's what I got now but I don't see where it is going wrong..

    Code:
    function deleteQuestion( _id ) {
     Element.remove( 'item_'+_id );
     new Ajax.Request('file.php', { asynchronous:true, parameters:'delete=1&item='+ _id});
    }
    the element remove is working but the database isn't updated.

    do you have any idea what i'm missing.

    Peanuts
    the neigbours (free) WIFI makes it just a little more fun

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    8,899
    Mentioned
    138 Post(s)
    Tagged
    2 Thread(s)
    NOFI, but do you have the file that is pointed to, file.php, that has the correct code to delete the item?

  3. #3
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind .. I found my booboo.. I misspelled a variable..
    the neigbours (free) WIFI makes it just a little more fun


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •