[Seaside] Using Insertions and Script Aculo

Lukas Renggli renggli at gmail.com
Mon Sep 24 11:37:22 UTC 2007

> Thank you very much for your small "tutorial"..
> But can you also help me to ensure, that DOM object exists. I need to check
> for existense, before removing it or making insertiong

As I said, it is much easier to do the whole logic in Smalltalk and
just regenerate the whole part without the element ...

Anyway, it is possible in JavaScript with something like that:

   "if the element #foo is there, remove it "
   (html selector new add: '#foo'; size)
       then: (html element id: 'foo'; remove)

This generates something like:

   $$('#foo').size() ? $('foo').remove()


Lukas Renggli

More information about the seaside mailing list