Jump to content

Ajax and Provisioning module


vkusno

Recommended Posts

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:

                        <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" />

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated