I have a template part with lots of html that I use both to add statically and dynamically to a page. The problem is the trailing 0 when adding with ajax which we get rid of using die() but that cuts off all content below when the function is added statically.

  • 3
    its better to create a function that create the output. then in AJAX you call the function and end with "exit()" and in the template, you just use the function. – mmm May 30 at 10:15
  • That definitely works – user300979 May 30 at 10:34

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.