Ajax Easy
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
Ajax Easy is a custom way to return whatever you want .
shipped with sub module "ajex easy node " is more of an example how to create custom module that uses custom JS to expose a path argument to ajax ...
the big idea is for custom modules to use:
HOOK_ ajax_easy(&$data)
where you set your custom menu path in the module admin config (hit help)
then feal free to pass 1 -2 arguments to the menu path
gab the values in YOURMODULE_ ajax_easy(&$data) and return what you need ! raw html or JSON for you JS Devs out there.
Example:
GET site.com/ ajex_easy/node/7
(return the body of node )
html sample
//to use in html
//data-ajax-easy="node/7"
//data-ajax-easy-target-id="result1"
//class has "ajax-easy"
<button data-ajax-easy="node/7" data-ajax-easy-target-id="result1" class="btn btn-default btn-lg ajax-easy">Test This</button>
<div id="result1">See the stuff here </div>
feel free to extend with `drupal_get_query_parameters` all you want.
to return ... well whatever you need to return in raw or json encoded way.
this is not for beginners ! Just an idea I had one day to do something quick.
