[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Iliad - updating elements
From: |
Nicolas Petton |
Subject: |
Re: [Help-smalltalk] Iliad - updating elements |
Date: |
Mon, 13 Jul 2009 22:40:05 +0200 |
Le lundi 13 juillet 2009 à 21:13 +0200, Stefan Schmiedl a écrit :
> On Mon, 13 Jul 2009 20:07:52 +0200
> Nicolas Petton <address@hidden> wrote:
>
> > Hmm, yes. As far as I remember, numbers are needed to know in which
> > order actions need to be executed, in a form for instance.
> >
> > But I don't think you need Session>>nextId, it is mostly used for
> > actions registration. You could use Iliad.Id instead.
>
> Channeling my youngest kid:
>
> butbutbut ... you *told* me I could use *either* of them ... sniff
Yes, you can. It's just that they are made for different purposes.
>
> My reasoning was that after looking at both implementations, I decided
> to go with the shorter :-)
>
> >
> > Also, #nextId may not be the appropriate name, since it answers an
> > integer. If someone has a better name in mind...
>
> if that's the purpose, why not call it #nextActionIndex?
Hmmm...not bad...let me think about it :)
>
> > > Question #2:
> > > The solution above nicely logs the expected XHR requests in firebug.
> > > When I tried
> > > Iliad.evaluteAnchorAction( "a#' , id , '" );
> > > instead, no such requests were logged. Do I actually go and read
> > > the Javascript books on the shelf behind me or is there something
> > > else I'm not aware of?
> >
> > Iliad.evaluateAnchorAction(anchor) expects a DOM element, not an id.
> > So Iliad.evaluateAnchorAction(jQuery(#someId)) should work.
>
> ... and it does, great!
>
> This means I'll skip the general javascript and give the jQuery docs
> a thorough reading instead. Looking at the implementation of
> evaluateAnchorAction led me to my erroneous belief.
>
> evaluateAnchorAction: function(anchor) {
> var actionUrl = jQuery(anchor).attr('href');
> this.evaluateAction(actionUrl);
> },
>
> hmmm.... final question: How would I do this without putting an anchor
> into my page? I guess I'd have to do some work to gather the expected
> session tokens and whatever else is required?
I would register an action in the session on the server side, and add
some js code to trigger the action every x seconds, using iliad.js
functions (evaluateAction).
Nico
signature.asc
Description: Ceci est une partie de message numériquement signée
- [Help-smalltalk] Iliad - updating elements, Stefan Schmiedl, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Nicolas Petton, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Stefan Schmiedl, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Nicolas Petton, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Stefan Schmiedl, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements,
Nicolas Petton <=
- Re: [Help-smalltalk] Iliad - updating elements, Stefan Schmiedl, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Nicolas Petton, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Paolo Bonzini, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Nicolas Petton, 2009/07/13
- Re: [Help-smalltalk] Iliad - updating elements, Stefan Schmiedl, 2009/07/14
- Re: [Help-smalltalk] Iliad - updating elements, Stefan Schmiedl, 2009/07/14
- Re: [Help-smalltalk] Iliad - updating elements, Nicolas Petton, 2009/07/14