OK, so the first problem was in the autofill.php. It should look like this:
function ajax_update(category) {
var value = category.value;
var text = category.options[category.selectedIndex].text;
$.post('../../mod/blog_tools/views/default/blog_tools/process.php', { text: text, value: value }, function(data) {
$('#result_div').html(data);
});
}
Now I am getting back the proper data.
TO DO:
1. How to use elgg functions in process.php?
2. If I type in the browser the URL of process.php, I can see its content. It is probably not registered properly. How can I fix this?
OK, it's me again. I needed to add to process.php an elgg engine igniter. It looks like this:
require_once(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/engine/start.php");
Now I can use every elgg function, however it takes 10x longer for the server to response, then without the igniter.
Is there any solution that would not require the ELGG engine to ignite and keep the every function?
One manual solution would be to everytime load every car from logged in users friends into an associative array, and refresh the other drop-downs with a javascript onChange action from this (after a while very big) array.
However this would result a huge amount of traffic on the server... at least I think so.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.