[Seaside] AJAX

an organic seasidebeginner at gmail.com
Mon Jan 7 10:04:27 UTC 2008


Ok,

>html anchor
>   onClick: (html updater
>      id: 'someid';
>      callback: [ :r |
>          body := aComponent.
>          self renderBodyOn: r ];
>    with: 'menu 1'.

r is renderer, but its renderer of  html updater or i must write here html
renderer when i call this part of code in:

anotherComponent >> renderConententOn: html
 html anchor
   onClick: (html updater
      id: 'someid';
      callback: [ :r |
          body := aComponent.
          self renderBodyOn: r ];
    with: 'menu 1'.

or r is right in this small example?


2007/12/30, Lukas Renggli <renggli at gmail.com>:
>
> > I want do this in root component render left menu head and bottom and
> > content area. And i want change content with ajax. Sometimes shows new,
> > sometimes users account info etc. i look on scriptacolous website but i
> dont
> > find any demo to do this. May be it's problem i dont know whati want to
> find
> > because i think there will be now script to call site skript.php from
> > index.php :). But can anybody show me best way to do what i want?
>
> Have a look at the senders of #updater.
>
> You pass it the id of the div that you want to change its contents and
> a callback block that renders the contents of that particular div
> element. Something like:
>
> html anchor
>     onClick: (html updater
>        id: 'someid';
>        callback: [ :r |
>            body := aComponent.
>            self renderBodyOn: r ];
>      with: 'menu 1'.
> html div
>     id: 'someid';
>     with: [ self renderBodyOn: html ]
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> 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/20080107/c8195706/attachment.htm


More information about the seaside mailing list