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

    I’m writing a snippet that has some Ajax interactions, and I’m wondering if the "ajax" part of the snippet has to be in it’s own page, or could be on the same page as the original call, but using something like:

    if ($isAjaxSubmission) {
      while (@ob_end_clean()) {}
      // Some Ajax processing here
      echo $ajaxResults;
      exit();
    }
    

    in order to return to the browser only the required ajax results.

    (I got this from the MaxiGallery code by the way).

    Could this result in any problems?

    Michal.