No announcement yet.

Handling Ajax requests for the non-default instance

  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling Ajax requests for the non-default instance

    I just started to develop a plug-in for which an instance per device is needed (to keep things simple). At this moment I am trying to implement the configuration page, and that is where I run into the following issue.

    When I add a (jQuery) drop list that sends an Ajax request on each change, the instance name is not passed to the server. Because of this HomeSeer thinks that the request is for the default instance, and calls PostBackProc on that instance.

    I already tried appending ?instance=... to several locations where the page name is used, but this did not help.

    How do I set up a configuration page for an instance so Ajax requests are sent to the correct instance process?

    Note: The X10 plug-in has the same problem.

    HS3 Standard Edition (Windows)

  • #2
    I found this old topic, which explains how to do it:

    • Append a colon and the instance name to the page parameter of the Ajax controls on your page.
    • HomeSeer will now call PostBackProc on the correct instance.
    • Note: The pageName parameter of PostBackProc will contain the colon and the instance name.