NETTE-LATTE: Include on click

Member | 1

I have a question. Can somebody explain me, how can I include another .latte file and send dynamic data with it?

I am creating api function, where you should be able to get information about company just by writing it's name. When I click to search, I can see in console that my request is getting through and sending back response, with correct data, but it won't refresh already loaded data.

Some examples of my code:


<!-- The Modal -->
<div id="myModal" class="modal">
    <!-- Modal content -->
    <div class="modal-content">
        <span class="close">&times;</span>

            {include 'data.latte'}



btn.onclick = function() { = "block";
var firma = $("#firmaName").val();

console.log( "var is " + firma );

$.ajax('data', {
    data: { 'firma' : firma}


Member | 121

You probably need this:

see also