hi, ZhiTao
the following is abstracted from the Library overview of Wt doc, try them,
I have never used it:-)

When the requirements for stateless slot learning cannot be met you will
have to resort to writing JavaScript manually. Wt provides a number of
mechanisms to integrate JavaScript code with C++:


   - Using 
JSlot<file:///home/cx/software/wt-2.99.1/doc/reference/html/classWt_1_1JSlot.html>,
   you can specify the JavaScript for a slot, when connected to an
   
EventSignal<file:///home/cx/software/wt-2.99.1/doc/reference/html/classWt_1_1EventSignal.html>.

   - Using 
JSignal<file:///home/cx/software/wt-2.99.1/doc/reference/html/classWt_1_1JSignal.html>,
   you can emit a C++ signal from JavaScript code, using a JavaScript function
   Wt.emit().
   - Using 
WApplication::doJavaScript()<file:///home/cx/software/wt-2.99.1/doc/reference/html/classWt_1_1WApplication.html#2a92457b9212cef4057cb54e56183967>,
   you can call JavaScript code directly as part of event handling.



2009/8/6 ZhiTao Chen <[email protected]>

> hi all,Is it possible with Wt to call a client javascript function with
> parameters?
> ex. There's a js function: function showMsg(msg) { alert(msg); }
> How to call it just like alert('hello'); in C++ code?
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to