2012-01-11, 11:43 AM
As I've stated a few time on this forum, I'm currently rewriting my MyStatus plugin. Part of this rewrite is that I'm moving to using Prototype JS rather than jQuery. Problem is, I'm not used to prototype at all and have hit a hurdle. Here's what I'm trying to do:
Each status listing has a delete link with a specific ID (mystatus-delete_{ID}). When this link is clicked, I wish to make an AJAX call to another file to ensure the delete is successful, then remove the row from the list. This should be fairly simple, right? Wrong. I can't seem to get Event.observe to play happily with my code at all. Here's what I'm currently trying:
In my eyes, that should work and according to JSLint, my code is correct. It does not work though.
I'd be extremely appreciative if somebody could point me in the right direction here
Each status listing has a delete link with a specific ID (mystatus-delete_{ID}). When this link is clicked, I wish to make an AJAX call to another file to ensure the delete is successful, then remove the row from the list. This should be fairly simple, right? Wrong. I can't seem to get Event.observe to play happily with my code at all. Here's what I'm currently trying:
$$("a[id^='mystatus_delete_']").observe('click', function(e) {
Event.stop(e);
});
In my eyes, that should work and according to JSLint, my code is correct. It does not work though.
I'd be extremely appreciative if somebody could point me in the right direction here