Actually no, it doesn't work without the parenthesis..
code:
var request = new ActiveXObject("Microsoft.XMLHTTP");
var serverResponse = "";
function getData()
{
var TYPE = "GET"; //use GET to request information and POST to send information
var URI = "http://twitter.com/statuses/user_timeline/__XD__.json"; //whatever server and or form you want to communicate with
var ASYNC = true; //if false script will pause until the request is complete
request.open(TYPE, URI, ASYNC);
request.onreadystatechange = processReadyStateChange();//
request.send(null);
}
function processReadyStateChange()
{
Messenger.MyPersonalMessage = "Twitter: Loading...";
if(request.readyState == 4 && request.status == 200)
{
json = eval( request.responseText )
Messenger.MyPersonalMessage = "Twitter: " + json[0].text
}
}
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.AddTimer("Timer",25000); //called every 5 second
getData()
}
function OnEvent_Timer(TimerId) {
if(TimerId == 'Timer') {
getData();
MsgPlus.AddTimer("Timer",25000); //called every 5 second
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}