Am 06.01.2014 21:18, schrieb Carsten A. Arnholm:
> On 06. jan. 2014 20:05, Olaf Radicke wrote:
>>
>>> "Carsten A. Arnholm" <[email protected]> hat am 6. Januar 2014 um 18:16
>>> geschrieben:
>> [...]
>>> Now I am wondering about the use of controls in HTML in pages controlled
>>> by Tntnet. For example, if you want to use a HTML date picker like
>>> http://sourceforge.net/projects/htmldatepicker/ in a page controlled by
>>> Tntnet, would that be a problem? The control instruction say "Copy the
>>> files htmlDatePicker.css and htmlDatePicker.js into your project's
>>> directory." Could they be compiled/linked into the webserver application
>>> somehow?
>> Is that what you mean?
>> https://github.com/maekitalo/bbstrassenfest/blob/master/src/view/suche.ecpp
> Hi Olaf,
>
> Interesting, you seem to have put a JavaScript code piece between
> </%session> and <%cpp>, I didn't know you could do that.
>
> Perhaps that is what I asked for, but I don't understand all your code.
> Is this using a 3rd party date-picker component or was it designed
> specifically for Tntnet? (I am talking about the JavaScript component)
>
> Best regard
> Carsten Arnholm
>
Hi Carsten,

the bbstrassenfest uses jQuery to display a date picker. And yes - you 
can compile javascript into a tntnet application using the binary mode 
of ecppc. See either the bbstrassenfest application or look into the 
static-howto of tntnet (http://www.tntnet.org/howto/static-howto.html) 
how to do that. There is also a tntnet demo calcajax, which compiles 
jQuery into the application. jQuery is a fine toolbox, which makes it 
much easier to write javascript based web applications.

And yes - you can switch between <%cpp>, <%session> or plain html 
whenever you wish. Normally it is best to put the C++-code before the 
html part. But sometimes it is just convenient to mix it. In this 
suche.ecpp, Olaf linked, the reference is just a shortcut, so that the 
ecpp do not need to repeat that "strassenfestResult.strassenfeste()" 
over and over again.

That all reminds me, that it may be feasible to write a 
jquery-in-tntnet-howto to explain, how to integrate it. And since there 
is nothing special in jquery, one can use the howto for other javascript 
frameworks as well.


Tommi

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to