Nathan,
Don't forget to consider the possibility that there is a separate
piece of Javascript that is not explicitly in the HTML which is
setting an event listener on each of the list items. A lot of times
we'll do this to minimize the amount of Javascript being written in
with HTML and to stay DRY. Just a thought...
-Jordan
On Mar 7, 2007, at 11:22 PM, Nathan Colgate Clark wrote:
My bad too... I don't think I realized I was trying to do that
either. I'm going to quit while I'm ahead. :) -Nathan
Patrick Crowley wrote:
My bad... I didn't realize you were trying to explicitly reverse
engineer their stuff. ;)
-- Patrick
On Mar 7, 2007, at 8:27 PM, Nathan Colgate Clark wrote:
But it isn't. No AJAX. No RJS. Nothing showing up in FireBug.
Just a silly javascript bit that hides it and sets the value to
"". It seems that they intentionally used this alternative
method instead of instead of AJAX. Perhaps because it doesn't
delete the records until you update the list.
The script:
<script> function deleteItem(id) { document.getElementById
('item_' + id + '_content').value = ''; document.getElementById
('item_' + id).style.display = 'none'; } script>Then something in
the model or controller that does a bit o' magic to figure out if
it has been deleted, then removes from the database. Something
like:
Item.update_or_delete(params....)
I was just wondering if anybody knew if that existed. I tried a
before_save callback to delete empty objects, but it wasn't working.
-Nathan
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby