Robert,
You cant load a ftl file like this. JavaScript is a client side
technology and Freemarker runs on server side. What you need inside your
JQuery is HTML fragment and therefore to get the contents of an HTML
file, create a request map in controller, pass it to the view map, and
then the screen widget. Within your screen, include the FTL file. This
is same as your calls without Ajax. Only difference would be, do not
include the decorator in your Ajax screen as it will show the complete page.
One you receive the response in your JQuery success callback, replace
the contents within you DIV with the contents received form server using
something like $(#your div id).html(data).
Thanks,
Raj
On Monday 16 April 2012 01:52 AM, Robert G. wrote:
> Hey,
>
> Im doing an Ajax database manipulation. After Ajax succeed I want to replace
> a div-container (referenced with its ID) with the content of an ftl file.
> THe background is,that I want to update the data in the div-container.
>
> I couldnt get it run with screens.render(../xy.ftl)
>
> I tried it with the .load method (jquery) like that:
>
> $(#div-container-ID).load(../xy.ftl), but it does not work. WIth above named
> rendering it had not worked either.
>
> Do anyone has an idea? I do this to avoid a complete site-reload.
>
> --
> View this message in context:
http://ofbiz.135035.n4.nabble.com/include-render-ftl-file-or-screen-in-a-java-script-file-tp4559817p4559817.html> Sent from the OFBiz - User mailing list archive at Nabble.com.
>