seaside javascript builders

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

seaside javascript builders

Siemen Baader
Hi all,

I'm confused about the limitations and intended use of Seaside's javascript builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or "html javascript alert: 'hello'" within the "renderContentOn: html" methods, but how do I deal with logic and variables? How do I eg. install an event listener and provide a browser-side function that extracts data from the event and then passes it to the server via "html jQuery ajax"?

Is this something to be done in pure JS returned from the #script method?

Thanks for any enlightenment!

Siemen
Reply | Threaded
Open this post in threaded view
|

Re: seaside javascript builders

Ben Coman


On Fri, Dec 9, 2016 at 9:20 PM, Siemen Baader <[hidden email]> wrote:
Hi all,

I'm confused about the limitations and intended use of Seaside's javascript
builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or
"html javascript alert: 'hello'" within the "renderContentOn: html" methods,
but how do I deal with logic and variables? How do I eg. install an event
listener and provide a browser-side function that extracts data from the
event and then passes it to the server via "html jQuery ajax"?

Is this something to be done in pure JS returned from the #script method?

Thanks for any enlightenment!

Siemen


Hi Siemen,

Sorry I can't help, I'm not a seaside user - but depending on your response here you might also like to try

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: seaside javascript builders

Siemen Baader
Thanks, I was unaware of the seaside list!

cheers,
Siemen

On Fri, Dec 9, 2016 at 5:18 PM, Ben Coman <[hidden email]> wrote:


On Fri, Dec 9, 2016 at 9:20 PM, Siemen Baader <[hidden email]> wrote:
Hi all,

I'm confused about the limitations and intended use of Seaside's javascript
builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or
"html javascript alert: 'hello'" within the "renderContentOn: html" methods,
but how do I deal with logic and variables? How do I eg. install an event
listener and provide a browser-side function that extracts data from the
event and then passes it to the server via "html jQuery ajax"?

Is this something to be done in pure JS returned from the #script method?

Thanks for any enlightenment!

Siemen


Hi Siemen,

Sorry I can't help, I'm not a seaside user - but depending on your response here you might also like to try

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: seaside javascript builders

philippeback
In reply to this post by Siemen Baader
I guess that's where passengers: come handy.

Because what you pass can be the result of a jQuery.

TBH sometimes it is easier to do a JSStream on: 'some js code that does what you want' instead of wondering for ages how to do the same with the Javascript classes, subclasses and methods.

Look into the test packages for lots of examples. That helped me.

Phil

On Fri, Dec 9, 2016 at 2:20 PM, Siemen Baader <[hidden email]> wrote:
Hi all,

I'm confused about the limitations and intended use of Seaside's javascript
builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or
"html javascript alert: 'hello'" within the "renderContentOn: html" methods,
but how do I deal with logic and variables? How do I eg. install an event
listener and provide a browser-side function that extracts data from the
event and then passes it to the server via "html jQuery ajax"?

Is this something to be done in pure JS returned from the #script method?

Thanks for any enlightenment!

Siemen



--
View this message in context: http://forum.world.st/seaside-javascript-builders-tp4926336.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: seaside javascript builders

Siemen Baader
Thanks, that was very helpful!

Siemen

Sent from my iPhone

On 09/12/2016, at 19.45, "[hidden email]" <[hidden email]> wrote:

I guess that's where passengers: come handy.

Because what you pass can be the result of a jQuery.

TBH sometimes it is easier to do a JSStream on: 'some js code that does what you want' instead of wondering for ages how to do the same with the Javascript classes, subclasses and methods.

Look into the test packages for lots of examples. That helped me.

Phil

On Fri, Dec 9, 2016 at 2:20 PM, Siemen Baader <[hidden email]> wrote:
Hi all,

I'm confused about the limitations and intended use of Seaside's javascript
builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or
"html javascript alert: 'hello'" within the "renderContentOn: html" methods,
but how do I deal with logic and variables? How do I eg. install an event
listener and provide a browser-side function that extracts data from the
event and then passes it to the server via "html jQuery ajax"?

Is this something to be done in pure JS returned from the #script method?

Thanks for any enlightenment!

Siemen



--
View this message in context: http://forum.world.st/seaside-javascript-builders-tp4926336.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.