Search code examples
ajaxcallbackjoomla1.7jumi

How to use a JUMI file in AJAX callback on Joomla


I'm trying to use a JUMI file (a component for Joomla that allows me to get aceess to Joomla MVC) in AJAX callback. The structure is like this:

  1. file.php that calls AJAX file is already a JUMI file.
  2. file ajax.js (included in file.php) makes the call.
  3. file.tooltip.php is a JUMI file which output is shown on file.php. It needs to be a JUMI because I need to access Joomla libraries to get the data it processess.

To prevent the problem that JUMI outputs a file with all the template I'm using in the Joomla call method in the end of the url in ajax.js: &tmpl=component. It works, but however it brings together all other calls for javascripts and so on contained in the template, which is bringing me to conflicts. The page is very slow and other javascript components are not working.

Does anyone know how is the best way to approuch the situation and get to a solution?

Thanks a lot!


Solution

  • You need to use &format=raw at the end of the url to the file you're ajax'ing to. Chances are though, that you get a server error because that "view is not supported". Easy fix, go to your site

    root/components/com_jumi/views/application/

    then make a copy of view.html.php called view.raw.php.

    This component REALLY needs to be updated.