how to hold an attribute in a variable?

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

how to hold an attribute in a variable?

Malte Grunwald
Hi everybody,

i try to hold an attribute, more precisely an id in a variable.
This is how i tried it:


self tRId:((jScript jQuery id: id) closest: 'tr') attributes: 'id')).

Is it impossible to do it like that? I have always a jQuery function in my variable.

Thank you!

Malte


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

Re: how to hold an attribute in a variable?

Johan Brichau-2
Hi Malte,

Do not confuse script generation with script execution.
You are indeed passing the generated script as an argument to the #tRId message.

What you need to do is to execute this script on the client and pass the resulting value back to the server. This is how to do it:

html jQuery ajax
        callback: [:value | self tRId: value]
        value: (((html jQuery id: id) closest: 'tr') attributes: 'id')

cheers
Johan

On 31 Jul 2012, at 15:22, Malte Grunwald wrote:

> Hi everybody,
>
> i try to hold an attribute, more precisely an id in a variable.
> This is how i tried it:
>
>
> self tRId:((jScript jQuery id: id) closest: 'tr') attributes: 'id')).
>
> Is it impossible to do it like that? I have always a jQuery function in my variable.
>
> Thank you!
>
> Malte
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

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

Re: how to hold an attribute in a variable?

Malte Grunwald
Thank you Johan.

It works absolutely well!
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside