AJAX

From MidasWiki
Revision as of 07:51, 21 August 2013 by Olchansk (talk | contribs) (→‎jmsg)
Jump to navigation Jump to search

About

This page will document the MIDAS AJAX functions accessible through special the mhttpd URLs.

jset

TBW

jget

TBW

jcopy

TBW

jkey

TBW

jmsg

  • JSONP: no
  • parameters:
    • ?n=number of messages to return
  • returns: output of cm_msg_retrieve()
   if (equal_ustring(getparam("cmd"), "jmsg")) {
      i = 1;
      if (*getparam("n"))
         i = atoi(getparam("n"));
      
      show_text_header();
      cm_msg_retrieve(i, str, sizeof(str));
      rsputs(str);
      return;
   }
  • example: TBW

jgenmsg

  • JSONP: no
  • parameters:
    • ?msg=message text
  • returns: ???
   if (equal_ustring(getparam("cmd"), "jalm")) {
      show_text_header();
      al_get_alarms(str, sizeof(str));
      rsputs(str);
      return;
   }
  • example: TBW

jalm

  • JSONP: no
  • parameters: no
  • returns: text from al_get_alarms()
   if (equal_ustring(getparam("cmd"), "jalm")) {
      show_text_header();
      al_get_alarms(str, sizeof(str));
      rsputs(str);
      return;
   }
  • example: TBW