Hi Dmitriy,
I actually solved it using doJavaScript . I wrote:
require("jquery-1.4.1.min.js");
and then:
doJavaScript(WT_JS($(function(){myfunction();});));
That way I make sure that the function is executed when the page is
ready (window.onload is not good enough because it triggers when the
page is "loading" and not when it's ready)
Here $(function(){}) is a shorcut for $(document).ready(function(){})
according to jQuery syntax.
Cheers,
Diego
On 2:59 PM, Dmitriy Igrishin wrote:
> Hey, Diego
>
> If you want to run custom JavaScript code only once when you
> application constructed you may want to call
> Wt::WApplication::doJavaScript(..) from you application constructor.
>
> Regards,
> Dmitriy Igrishin
>
> 2010/4/16 Diego Cantor-Rivera <[email protected]
> <mailto:[email protected]>>
>
> Hello,
>
> I know that it is possible to load js libraries using
> Wt::WApplication::require but, how do you invoke one of the
> javascript functions in the js library on the OnLoad event of <body> ?
>
> Thanks,
>
> Diego
>
> Visit me at: http://bit.ly/dcantor/ <http://bit.ly/dcantor>
>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> witty-interest mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
--
Diego Cantor-Rivera
mailto:[email protected]
--------------------------------------------------------------------
p.s. Internet Privacy
--------------------------------------------------------------------
My PGP public key is attached to this message.
If you want to know how to use my key please let me know.
Ma cle publique PGP est attachee a ce message.
Si tu veux savoir comment l'utiliser, demande-moi pour renseignements.
Mi llave publica PGP se encuentra anexada a este correo.
Si quieres saber como usar mi llave, preguntame.
--------------------------------------------------------------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest