Hi everyone,
I wrote the following code for getting an alert in every 3 seconds
/*********************************/

function view_onopen()
{
  getAlert();
}
function getAlert()
{
  view.alert("in getAlert()");
  view.setTimeout("getAlert()", 3000);
}
/*********************************/

this is working fine., but when I hav chaged my code to

/***************************************/
function view_onopen()
{
  getAlert();
}
function getAlert()
{
  getUpdates();
  view.setTimeout("getAlert()", 30000);

/* this time I increased duration from 3 seconds to 30 seconds, coz I
have read some where that the request to server should min. of 30 sec.
*/

}
function getUpdates()
{
  var xmlHttp = new XMLHttpRequest();
  xmlHttp.onreadystatechange = function()
  {
   if(xmlHttp.readyState == 4)
   {
    if(xmlHttp.readyStatus == 200)
    {
      view.alert(xmlHttp.responseText);
    }
   }
  }
  xmlHttp.open("GET","http://localhost:8080/getUpdates.do",true);
  xmlHttp.send(null);
}
/***************************************/


can anyone help me out, inorder to get
updates....?????????????????????????????????????????

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-desktop-developer?hl=en.

Reply via email to