Re: JavaScript not invoked on zone refresh

2018-10-01 Thread Christopher Dodunski
Thanks Chris & JumpStart, with your help I was able to get this CSS animation working, using JavaScriptSupport in combination with RequireJS. Below is the code, for anyone else wishing to do the same. **The CSS** .open-section{ transition:0s; transform: rotate(90deg); } .close-section{

Re: JavaScript not invoked on zone refresh

2018-09-26 Thread JumpStart
Examples can be found in JumpStart, starting here: http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript > On 26 Sep 2018, at 3:19 pm, Chris Poulsen wrote: > > Reacting to the zone events sounds like the best option IMO. Controlling > this from the server

Re: JavaScript not invoked on zone refresh

2018-09-26 Thread Chris Poulsen
Reacting to the zone events sounds like the best option IMO. Controlling this from the server side seems needlessly complex and fragile in this case. Not really related to your issue, but you can call exported module methods in 5.4 like this: JSONObject specification = new JSONObject(

Re: JavaScript not invoked on zone refresh

2018-09-25 Thread Christopher Dodunski
After exploring a little further, I discovered the below thread on invoking javascript from within Tapestry. https://stackoverflow.com/questions/27988473/pass-parameter-from-java-to-js-in-tapestry Joost writes: You will need to use the JavaScriptSupport service. Your java file:

Re: JavaScript not invoked on zone refresh

2018-09-25 Thread Christopher Dodunski
Thanks Chung and Chris. I doubt using .click() will work, as the button being clicked on is immediately replaced, and it is this new button that must rotate. The buttons are for expanding and collpasing sections of a webpage. Once a user clicks on an expand button, it is immediately replaced

Re: JavaScript not invoked on zone refresh

2018-09-25 Thread Chris Poulsen
Hi Zone updates are updates of parts of the page, so the ready function is not triggered for those. Consider also performing your initialization on zone updates. See: http://tapestry.apache.org/current/coffeescript/events.html#section-20 for the zone related events. -- Chris On Tue, Sep 25,

Re: JavaScript not invoked on zone refresh

2018-09-24 Thread Chung Duy
Your javascript register when document is ready , it means just affect when page load or refresh page. If you want handle it via button, please register onclick event for this button and implement new small function with call the same snippet. Assume you're using jquery, so here is my thoughts: