Re: Javascript + jquery + php page

Håvard Wahl Kongsgård <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <CAKH910_s-Yb4x5G4q79euqMHav0fg6vFebqVaDn0-dTWvnr06g@mail.gmail.com>
Thanks, but is it possible to integrate SQL with FreeMarker? I use
geoserver(FreeMarker is the template engine). I only need to do some
simple inserts from a form to a postgresql database.

-Håvard

2011/8/27 Daniel Dekany <[email protected]>:
> FreeMarker just generates text (like HTML, JavaScript, whatever) on
> the *server* side. So of course you can have AJAX, jQuery etc. on your
> FreeMarker-generated web pages. But mind you, JavaScript runs on the
> *client*, and hence after FreeMarker was generated the page.
>
> You can't (or shouldn't) use FreeMarker on the same way as you use
> PHP. With PHP you do all the program logic including the presentation,
> while with FreeMarker you do the presentation only. FreeMarker is for
> MVC frameworks, where it's used for the MVC View. Do the non-View
> programming in Java, Groovy, Scala, or whatever you prefer, but not in
> FreeMarker. (Or if you don't need MVC, you don't want to use
> FreeMarker.)
>
> Saturday, August 27, 2011, 8:57:10 PM, Håvard Wahl Kongsgård wrote:
>
>> Hi, without  success, I experimented with including simple Javascript
>> Ajax code interacting with a PHP site in freemaker templates.
>>
>> example
>> http://yensdesign.com/2009/01/create-a-shoutbox-using-php-and-ajax-jquery/
>>
>> With the current version of freemaker is it possible to include this
>> type of code in freemarker templates?
>>
>
> --
> Best regards,
>  Daniel Dekany
>
>

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.