[Seaside] jQuery anchor and multiple div update
Ryan Simmons
ryan.craig.simmons at gmail.com
Wed Jun 5 08:52:51 UTC 2013
You don't need to use load in this context as it is creating additional
ajax requests.
Try the following.
onClick: (html jQuery ajax
script: [ :s | s << (s jQuery: #'base') html:[:h|* "A" self
incrementaIndex: true.*
"B1" (self renderingBaseOn: h)].
s << (s jQuery: #'orarioRiferimento') html:[:h| "B2" ( self
renderOrarioRiferimentoOn: h)]]);
On 5 June 2013 10:40, <dtrussardi at tiscali.it> wrote:
> Ciao,
>
> i have a anchor based on this code:
> html anchor
> script: (html jQuery this button
> text: true;
> primaryIcon: 'ui-icon-circle-plus'
> title: 'Successivo');
>
> onClick: (html jQuery ajax
> ( html jQuery ajax
> script: [ :s | s << (s jQuery: #'base') load html:[:h|* "A" self
> incrementaIndex: true.*
> "B1" (self renderingBaseOn: h)].
>
> s << (s jQuery: #'orarioRiferimento') load html:[:h| "B2" ( self
> renderOrarioRiferimentoOn: h)]]);
> with: '>'.
>
>
> My objective when a user click on this anchor is:
>
> A) update a index with the *self incrementaIndex: true.*
>
> B1) update the div #base with: self renderingBaseOn: h
>
> B2) update the div #orarioRiferimento with: self
> renderOrarioRiferimentoOn: h
>
>
> Where the B1 - B2 rendering is based on the index state.
>
> Now i have a strange behavior because sometime the B2 div
> #orarioRiferimento renderings is not aligned to the index.
>
> As if the onClick script action is not execute in the definition sequence.
>
>
> Any suggestions ?
>
> What is the right definition to solve this problematic type ?
>
> Thanks,
>
> Dario
>
>
>
> _______________________________________________
> 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/20130605/87fe94c0/attachment-0001.htm
More information about the seaside
mailing list