AJAX EXAMPLE does not work on NON-TERMINAL PAGES

I have been trying out the various tutorials and examples in Xwiki - particularly related to AJAX. I finally found out that the AJAX EXAMPLE available under SNIPPETS ( https://snippets.xwiki.org/xwiki/bin/view/Extension/AJAX%20example) - works only when the JsonHello and HtmlHello are TERMINAL pages – i.e, they do not have the .WebHome suffix in their page reference. - though the URL generated look similar.
Can someone tell me how to get JSON data using AJAX from a NON-TERMINAL page. Not clear where the problem lies ?? In the URL generated or in the difference in the structure of the page itself.