Announcement

Collapse
No announcement yet.

Handling Ajax requests for the non-default instance

Collapse
X
  • 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 3.0.0.435 (Windows)

  • #2
    I found this old topic, which explains how to do it: https://forums.homeseer.com/forum/ho...d-postbackproc

    Summary:
    • 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.

    Comment

    Working...
    X