load JS at end

Added by Marcelo Antunes 3 months ago

Usually, on an HTML document it's possible to include js at end, in order to that js is just applyed at end of page render.
It's possible doing the same on wt?
I already tried to put the require methods after i insert the widgets on the page, but it doesn't work.

regards
Marcelo


Replies (2)

RE: load JS at end - Added by Stefan Bn 3 months ago

I guess your question is a little vague.

Basically you load the javascript using WApplication::require, at any point in your code where you want that javascript being executed you use WWidget::doJavaScript.

Check my example here:

https://redmine.webtoolkit.eu/boards/2/topics/16917

(1-2/2)