Alex McAuley schrieb:
> Dude, firstly please stop topping the message and removing the code 
> and replies from your replies.
>  
> secondly: try the below script and see what gets alerted (it should be 
> your numeric ID, if not then you have something wrong somewhere
>  
>
> $('clones').observe('click',function(evt){
>
>       var elm = evt.element();
>
>       if (elm.hasClassName('remove')){
>
>         evt.stop();
>
>  
>
>         var id = elm.id.split('_').last();
>
>        
>
> alert(id);
>
> return;
>
> new Ajax.Request('remove_clone.php',{
>
>           parameters:{clone:id},
>
>           onSuccess:function(transport){
>
>             elm.up('li').remove();
>
>             pollSortable.defer();
>
>           }
>
>         });
>
>     ----- Original Message -----
>     *From:* Yan Kovyakh <mailto:maybe...@gmail.com>
>     *To:* prototype-scriptaculous@googlegroups.com
>     <mailto:prototype-scriptaculous@googlegroups.com>
>     *Sent:* Monday, July 20, 2009 7:35 PM
>     *Subject:* [Proto-Scripty] Delete php
>
>     They actualy have Item_numericalID
>
>     Is this the problem?
>
>
>
>     >
I don't wanna advertise my works, but maybe you should try a different 
approach. I think it's cumbersome to get a numerical id of a database 
objects (that's what it is, right?) from an elements id by splitting it.
Maybe you should try my Deletr library, I guess it does pretty much what 
you need: Delete a row from a table and perform an ajax request to 
delete the row from the database.

Have a look at my post, maybe this is a solution for you:
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/4fd6aab8f12aea95/07cbd61264f08a7a

Demo and download links can be found there.

Regards,
David

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to