Jump to content

Using AJAX within a custom addon


Recommended Posts

I'm developing an addon where AJAX is used to pull knowledgebase categories from the database.




However, the get_kb_categories script which is called via AJAX doesn't have the DB object so any queries to the database fail.


If I add the code from the get_kb_categories.php script to the main script, then it works, but WHMCS returns the full HTML page and not just the value so this approach doesn't work either.


Does anyone know of a solution which doesn't involve me manually having to connect to the database?

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.

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