SUEvaluator and SUInsertion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SUEvaluator and SUInsertion

Thomas Fischer
Hi list,
I like to insert content at the top of an element and the bottom of an
other element via SUEvaluator, but I dont know, how I can do this in
the following code (SUElement>>render:)

html button
  onClick: (
    html evaluator
      triggerFormElement: #myInputId;
      callback: [
        :script |
        script element id: #myEl1Id; render: [
          html text: TOP'
        ].
        script element id: #myEl2Id; render: [
          html text: 'BOTTOM'
        ].
      ]
  );
  with: 'CLICK'
.
Reply | Threaded
Open this post in threaded view
|

Re: SUEvaluator and SUInsertion

Lukas Renggli
>         script element id: #myEl1Id; render: [
>           html text: TOP'
>         ].
>         script element id: #myEl2Id; render: [
>           html text: 'BOTTOM'
>         ].

script element id: #myEl1Id; insertion: SUInsertion top; render: [ :r |
     r text: TOP'
].
script element id: #myEl1Id; insertion: SUInsertion bottom; render: [ :r |
     r text: 'BOTTOM'
].



--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUEvaluator and SUInsertion

Thomas Fischer
> script element id: #myEl1Id; insertion: SUInsertion top; render: [ :r |
>      r text: TOP'
> ].

Thanks for your answer.

I also try this intuitive before, but get I a
  MessageNotUnderstood SUElement>>insertion:

Maybe I (Scriptaculous-lr.174) need a newer version?

salute
Thomas
Reply | Threaded
Open this post in threaded view
|

Re: SUEvaluator and SUInsertion

Lukas Renggli
> I also try this intuitive before, but get I a
>   MessageNotUnderstood SUElement>>insertion:
>
> Maybe I (Scriptaculous-lr.174) need a newer version?

Sorry, this is wrong indeed. I didn't notice that you were using an
element, the code I gave only works for updaters.

Try something along:

    script insertion top; id: #myEl1Id; with: [ :r | r text: 'top' ]

This should work.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside