SAPO::Communication.Syndication->main

This method will load a JSON object into the browser and execute arbritary code while it loads, when it loads and or if it fails.

Also, it has a unique feature in which the JSON object name is ignore and automaticaly mapped.

Syntax

new SAPO.Communication.Syndication(<json_uri>, {<options>});

or 

var myobject = new SAPO.Communication.Syndication();
var myid = myobject->push(<json_uri>, {<options>}); 

myobject->run(myid); // will execute feed with ID = myid 
   or 
myobject->runAll(); // will execute all feeds 

Compatibility

Firefox 1.xYes
Safari 2Yes
IE6Yes
IE7Yes
OperaYes

Depends

Input Parameters

  • (uri) json_uri : URI of the JSON object
  • (object) options : Optional Parameters
    • (function) onComplete : Callback function to be executed when the JSON is fully loaded
    • (function) onLoading : Function to be executed while the JSON object is being loaded
    • (function) onTimeout : Function to execute is the object loading timeouts (see timeout)
    • (function) timeout : Timeout in seconds to load the JSON onject
    • (object) optOnComplete : onComplete arguments, if any (appended to the JSON object argument)
    • (object) optOnLoading : onLoading arguments, if any
    • (object) optOnTimeout : onTimeout arguments, if any
    • (object) objectName : Name of the JSON object being return. If not specified, the code will adapt to any name being returned.

Sample

 http://js.sapo.pt/SAPO/Communication/Syndication/sample/index.html


Community feedback

Error: Failed to load processor AddComment
No macro or processor named 'AddComment' found