Hello everyone. I am writing a provisioning module and want to use Ajax to call certain functions.
The problem is that if i implement a function, for example, mymodule_reboot($params) i can access it by submiting a form like:
But that at the end produces the whole page output which is not OK since i want to use Ajax. I thought maybe it is possible to supress output somehow and force whm to print only the "return" value of a function?
Yes maybe the way to solve this is to create a single php file with dbconnect include and do what i want there, but how do i get $params variable with all the info i need? including something else + API calls?
The problem is that if i implement a function, for example, mymodule_reboot($params) i can access it by submiting a form like:
Code:
<form id='actionForm' method="post" action="clientarea.php?action=productdetails">
<input type="hidden" name="id" value="{$serviceid}" />
<input type="hidden" name="modop" value="custom" />
<input type="hidden" id='action' name="a" value="reboot" />
Yes maybe the way to solve this is to create a single php file with dbconnect include and do what i want there, but how do i get $params variable with all the info i need? including something else + API calls?