Version 6, last updated by slim at Mar 19 06:40 2007 UTC

Sample Declaration

<div id="mess1"
    impl="~0169729ED9947D4f2dAF5B1C81D6CD4C26"
    properties="message:'Hello World'"
    script="http://localhost/SendMessage.js">
</div>

Input Terminals

  • trigger: (expected message type: any)

Output Terminals

  • startup_message_out :
  • triggered_message_out :

Properties

  • message : (type: any)

Demos that use it

  • 43.html
  • form.html

How does it work?

There are two ways to use this infotron. First, a message can be sent out through the startup\_message\_out output terminal as soon as the page loads. Second, a message can be sent out through the triggered\_message\_out output terminal when a message arrives at the trigger input terminal. The message sent out can be configured by setting the message property.


BLUEPRINT(
"~0169729ED9947D4f2dAF5B1C81D6CD4C26",
[
 ["%startup", "onStartUp", 1],
 ["trigger_in", "onTrigger", 1]
],
[
 "startup_message_out",
 "triggered_message_out"
],
function(Class)
{
  Class.prototype._onInit = function(props)
  {
    this._msg = props["message"];
    if (this._msg === undefined) {
      this._msg = this.dom_node.innerHTML;
    }
  };

  Class.prototype.onStartUp = function(msg)
  {
    this.postMessage("startup_message_out", this._msg);
  };

  Class.prototype.onTrigger = function(msg)
  {
    this.postMessage("triggered_message_out", this._msg);
  };
},"Send Message");