[Seaside] Appending rows in-between from AJAX

Ryan Simmons ryan.craig.simmons at gmail.com
Tue Aug 19 06:02:47 UTC 2014


I might have forgotten a script add: so if the above does not work try

[:script | script add: ( (script jQuery: #id2) after: [:xhr | xhr
tableRow: [ "..."]) ] ]


On 19 August 2014 07:58, Ryan Simmons <ryan.craig.simmons at gmail.com> wrote:

> 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/5c8cca4d/attachment.htm


More information about the seaside mailing list