[Seaside] Appending rows in-between from AJAX

Ryan Simmons ryan.craig.simmons at gmail.com
Tue Aug 19 05:58:11 UTC 2014


I would try something like

tag onClick: (
  (html jQuery ajax script: [:script | (script jQuery: #id2) after: [:xhr |
xhr
tableRow: [ "..."] ] ]
)


On 19 August 2014 06:59, Esteban A. Maringolo <emaringolo at gmail.com> wrote:

> Is there a way I can pass an generated html to the after() jQuery function?
>
> I have the following html:
>
> <table>
> <tr id="id1">...</tr>
> <tr id="id2">...</tr>
> <tr id="id3">...</tr>
> <tr id="id4">...</tr>
> </table>
>
> I want that, via a click handler, load another table row after row
> with id #id2 or #id3.
>
> If in the following command line works:
> $("#id2").after('<tr>...</tr>');
>
>
> But in Seaside I would like to do something like:
> tag onClick: (
>   (html jQuery: #id2) after: (html jQuery load html: [:xhr | xhr
> tableRow: [ "..."] ])
> )
>
> This load the generated html, but appends it to end of the table
> instead of doing it after #id2 as I would expect.
>
> Any pointers about this?
>
> I'm trying to build an "expansible" table (drill-down style, like a
> tree), but rendering each row children on demand. Maybe there already
> exists a component for this purpose.
>
> Regards!
>
> Esteban A. Maringolo
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20140819/89e97648/attachment.htm


More information about the seaside mailing list