При використанні бібліотеки FullAjax можна зіткнутись з тим, що інші скрипти (наприклад LightBox) відмовляються працювати, або працюють не коректно. Причина з якої вони відмовляються працювати дуже проста – вони не зовсім розраховані на сумісну роботу з AJAX.
Як це можна поправити, опишу в декількох рядках нижче…
Основна причина (але не єдина) по якій деякі скрипти відмовляються працювати сумісно з AJAX – це те, що вони не “бачать” коли AJAX сторінка завантажена та готова до “використання”. Щоб це поправити потрібно самостійно їм вказувати, що сторінка “готова”.
Для цього, після завантаження AJAX сторінки потрібно повідомити скриптам, що сторінку оновлено.
Щоб визначити коли сторінка готова, можна скористатись подією “load” бібліотеки FullAJAX (приклад для Mootools fireEvent()):
FLAX.Html.onall('load', function(options){ window.fireEvent('domready'); }); |
або функцією зворотного виклику:
function doSomethingAfterFAjxPagLoad (){ window.fireEvent('domready'); }; |
Щоб ця функція спрацювала після завантаження AJAX сторінки, в базові налаштування бібліотеки FullAjax потрібно додати параметр onload:doSomethingAfterFAjxPagLoad .
Приклад :
FLAX.Filter.add({url:'/', id:fullAjaxId, onload:doSomethingAfterFAjxPagLoad}); ... function doSomethingAfterFAjxPagLoad (){ /* fix for mootools 'domready', uncomment if need*/ /* window.fireEvent('domready'); */ }; |
При використанні window.fireEvent(‘domready’); потрібно бути обережним.
По перше це допомагає лише якщо скрипт дійсно не “бачить”, що сторінка “готова”.
По друге, при сумісному використанні з іншими скриптами які нормально працюють з AJAX – це може призвести, до додаткових не бажаних помилок, таких як подвійне виконання цього скрипта. Тому в плагіні ця функція за замовчуванням закоментована.
В деяких випадках потрібно використовувати window.fireEvent(‘load’); – все залежить від самого скрипта який “відмовляється” працювати.
Взагалі, якщо “неробочий” (наприклад LightBox) скрипт потрібен лише на певній сторінці, то вище вказану функцію краще виконувати саме на цій сторінці, а не на кожній. Це попередить виникнення додаткових помилок.
Приклад для сторінки “Галерея” ( mysite.com/galery ):
if(location.toString().indexOf('/galery') != -1){ window.fireEvent('domready'); } |
Далі буде, можливо… :)

Thank you!
It works!
Sorry! First of all, many many thanks for your work. this plugin is amazing. I have been looking for something similar since longtime.
BUt I have some problemsm, I tried to follow your explanations here, and it seems as I cannot understand.
I have a module that has to be loaded just in one voice of my menu, but when I open this page, fullajax load just the content and there is no module.
I didn’t understand how should I edit your script probably.
Could you make an example for me?
Let’s say the module name is “search_module”, the jdoc position is “left”, and the menu voice where it should be loaded is “archive”, how should I edit your script? what should I write and what should I delete?
Many thanks for your help. Hope you will save me.
yes, default this plugin load only content. For modules you need addiditional settings. Look here : How to configure … on the “three steps how to”, and more adwanced here How to update more than one module with Ajax
Hey great dev,
thx for the nice Plugin! :)
Is there a possibility to use the modalbox beside the fullajax system? I always get
“����” hundreds of thounds of such lines.. :-(
This is really a pity!
May you help me?
Thx & greetz
tim
Hi tim,
You tried all from this post? ;)
And whether modalbox works without a fullajax?
For help I need look you site.
Hi Fedik,
thx for answering, I have the joomla in our students network. It’s no public access yet.
Well, without activating your plugin it works pretty well. I tried very much, like jce-mediabox, yoo gallery, bottlebot and so on. When I open the site like this http://www.example.com/examplesite
then it works, but when I click around and get this link http://www.example.com/examplesite#ajx/examplesite again. I’m not able to open up any lightbox popup.
Would be very nice, because we want do a kind of radio-site.
Thx in advance!
if things from this post not helped need look how the lightbox initialised … then add a changes in FullAjax configuration
Is there a possibility to say to the script, that if there is a picture, to not open the picture in the same way like an article?
Because the script tries to open a picture like a website.
I managed again that what you’ve written above. But the problem, that the script wants to open the picture is still there :-(
yes, possible, try add in configuration the code like next:
but I not sure whether it helps, think still need again initialise the lightbox script after AJAX loading
:-)
That was it!
Many, many thx!
This and the hint above (Js code, parameters for FullAjax). At first I edited the JS File, because I haven’t see this in the Plugin Administration.
Fedik for Joomla President:)
Your filters are great! :)
I have to admit, that your component is very complicated, but after two or three days working with, I understood how to set it up. It’s very customable and like I said, your filters.. I love them:)
Thank you very much!
glad that you liked ;)
but it not only my work, I only wrote plugin for Joomla, FullAjax library wroted by other mans ;)
Thank you! This also fix DJ Image Slider problem :)