#1
  1. No Profile Picture
    frequent PHP idiot
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    354
    Rep Power
    12

    Checkbox ajax update


    I'm trying to create a list of items that can be checked and when so, an ajax call is made to update the database based on an ID passed to the php page.

    I have the start of the javascript, but have no idea how to pass in the info to the php page. Can anyone help?

    PHP Code:
                          
    $("input:checkbox").change(function() {
        if(
    this.checked) {
            
    alert('checked');                                
        }
        if(
    this.checked==false) {
            
    alert('done');                                
        }
    }); 
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,176
    Rep Power
    184
    Check this out; it should get you going, in the right direction: jQuery .ajax() API Documentation.

IMN logo majestic logo threadwatch logo seochat tools logo