[Seaside] Detect the position of a page div
watchlala at hotmail.com
Wed Sep 23 03:48:03 UTC 2009
How can I get the offset value and store it in an instance variable then?
The following is an example of something I tried that didn't return anything :/
onLoad: (html jQuery ajax script: [:s | s add: (self top: (s jQuery this offset access: 'top'))]);
onLoad: (html jQuery ajax script: [:s | s add: (self left: (s jQuery this offset access: 'left'))]);
script: (html jQuery new draggable);
> Date: Tue, 22 Sep 2009 21:56:31 +0200
> Subject: Re: [Seaside] Detect the position of a page div
> From: renggli at gmail.com
> To: seaside at lists.squeakfoundation.org
> > So "#text:" doesn't expect the same thing as "#html:" then?
> Nop, but you are right. Maybe that's not quite right what Seaside does here?
> > Oh, also. I recall a comment somewhere that you can only register one
> > callback on a class? Does that only apply to seaside components?
> No, this has nothing to do with components.
> You can only register one primary callback for an ajax object, e.g.
> html jQuery ajax callback: [ ... ]; callback: [ ... ] " <-- wrong "
> does not make sense, because Seaside returns a response after
> processing the primary callback. However you can register as many
> secondary callbacks as you want, e.g. to serialize values to the
> html jQuery ajax " <-- correct "
> callback: [ :v1 | "this is a secondary callback" ] value: ....;
> callback: [ :v2 | "this is a secondary callback" ] value: ....;
> html: [ :h | "this is a primary callback that generates html,
> internally it calls #callback:" ];
> Note that the primary callback is always evaluated last, whereas the
> secondary callback are evaluated before in order they were defined.
> Hope this helps?
> Lukas Renggli
> seaside mailing list
> seaside at lists.squeakfoundation.org
Hotmail: Powerful Free email with security by Microsoft.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside