We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    Hi,

    I have a resource with (roughly) the following content:

    <!-- HTML displayed properly -->
    <div>
    ... Some titles etc ...
    </div>
    
    [[!BuildAvailability]]
    
    <!-- HTML not being displayed -->
    <div>
    ... some more HTML ...
    </div>
    


    The problem is that any HTML after the snippet
    [[!BuildAvailability]]
    is not outputted to the page. The specific snippet renders three divs and for each div it makes an $.ajax call to retrieve the contents of each div from the server. The initial load of these divs is triggered by a jQuery
    $(document).ready()
    function call. The snippet works great, that's not the problem.

    When I remove the snippet, the HTML after the snippet is displayed properly. I suspect this has something to do with the $.ajax calls but I do not understand why as the initial call is triggered by a $(document).ready() so only after the whole DOM tree is ready.

    Am I missing something?

    Thanks. [ed. note: skndn60 last edited this post 11 years, 6 months ago.]
      MODx Revolution / MAMP / OS X
      • 27519
      • 275 Posts
      Erm... this was caused by an omitted but apparently important </div> tag. Sorry if I wasted your time :-/
        MODx Revolution / MAMP / OS X