Hey,

I'm brand new to AJAX and scriptalicious, so i'm hoping for some help.

inside hello.php

I have this piece of code to grab and loop out users in the database:

function test(){
     $query = mysql_query('SELECT * FROM `testing`');

     while($i = mysql_fetch_row($query))
     {
         echo'<div class="testie">';
         echo $i[0] . "<br />";
         echo $i[1] . "<br />";
         echo $i[2] . "<br />";
         echo '<a href="javascript: MyAjaxRequest(\'main\',\'hello.php?
ID=' . $i[2] .'\')">Delete</a><br />';
         echo '</div>';
    }
}

This piece of code deletes the user from the database if chosen, and
then re-generates the list via AJAX:

if($_GET[ID] == "")
{
    echo "nothing";
}else{
    $delete = mysql_query('DELETE FROM `testing` WHERE ID = ' .
$_GET[ID] . '');
    echo "Item has been deleted";
    test();
}

Now comes the problem, how would i make the delete div use the
scriptalcious fade effect to fade out, then execute the AJAX function
to delete the user?

Any help is greatly appreciated!

Thanks,

envex


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to