Does that mean that you can use jquery syntax inside doJavaScript
statements?

That is awesome!

Diego

On 2:59 PM, Koen Deforche wrote:
> Hey all,
>
> You are all correct though... Wt will only render the JavaScript set
> with doJavaScript() only after the application has been loaded, thus
> explicitly doing this using jquery is not necessary.
>
> And btw, Wt includes jquery (since the last 2 releases), so you do not
> require jquery either.
>
> Regards,
> koen
>
> 2010/4/19 Dmitriy Igrishin <[email protected]>:
>   
>> Hey, Diego
>>
>> I understand you solution. Since the application needs to render
>> content first my recommendations was not correct.
>> As alternative to you solution I guess its possible to create a
>> single shot Wt::WTimer from you application constructor,
>> connect it to slot and call the custom JavaScript from this slot.
>>
>> Regards,
>> Dmitriy Igrishin
>>
>> 2010/4/18 Diego Cantor <[email protected]>
>>     
>>> 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]>
>>>       
>>>> 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/
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Download Intel&#174; 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
>>>>
>>>>         
>>>
>>>
>>> --
>>>
>>> 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&#174; 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
>>>
>>>       
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; 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
>>
>>
>>     
>
>   


-- 

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.

--------------------------------------------------------------------


------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to