hey. me again!
I've created my own module. Everything works fine.
In my models folder, i hav an myapp_categories_model.php.
in this model, there are several input elements. one of them is a select item. now i want to add an event to this select item, which will load some other database entries, on change. i've added an JS Controller and the right function.
var path = jqx.config.fuelPath + '/myapp/categories/'
$.post(path, {id:$('#id').val() }, function(html){ });
How can i manage a right Ajax request? Do i need a new controller?
Comments
http://www.getfuelcms.com/user_guide/modules/advanced
thank you. And hey: FUEL IS AWESOME!!
$.get('my_module/ajax/my_method', {limit: 5}, function(html){ console.log(html); }
Would map to a method on you my_module's model of "ajax_my_method()". Arguments can be passed to the method as an array. You can pass parameters via ajax with the get object parameters (e.g. {limit: 5}).