Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Background script


  • From: shanex.fael at gmail.com (Rafael Santos)
  • Subject: [Javascript] Background script
  • Date: Mon Aug 28 15:18:26 2006

Well, i know a way:

function verify(){
  var delay = 1800; //i guess it's 1 minute
  getmsgs = setTimeout(fn_getmsg, delay);
}

function fn_getmsg(){
   //ajax request
   //get the result
   //if result > 0
   //echo the result or any info...
}

so, u just have to know the basic of ajax...
a simple GET should work...

I suggest u to meet jQuery.com An amazing js library... only 16k


2006/8/28, Fl?vio Gomes <flavio@xxxxxxxxxxxxxxxx>:
>
> /> Is it as simple as just setting a timer function that triggers my
> function?
> >  Or is it any drawbacks with doing that? Is other scripts available
> during this time?
>
> /Never played with AJAX, but I believe that "Yes, it's just that simple".
>
> Try it and tell us.
>
> Peter Lauri escreveu:
>
> > Best group members,
> >
> >
> >
> > I have a site where I have an internal message system. With this I
> > want to add functionality so that when a user have a new message, an
> > alert box will show up with that information.
> >
> >
> >
> > What the script actually would do is to every minute connect execute a
> > script that use AJAX to retrieve the number of unread messages, and
> > then alert if it is more then the last time.
> >
> >
> >
> > I want to have a script that does not effect other scripts on the site.
> >
> >
> >
> > Is it as simple as just setting a timer function that triggers my
> > function? Or is it any drawbacks with doing that? Is other scripts
> > available during this time?
> >
> >
> >
> > Best regards,
> >
> > Peter Lauri
> >
> >
> >
> >
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Javascript mailing list
> >Javascript@xxxxxxxxxx
> >https://lists.LaTech.edu/mailman/listinfo/javascript
> >
> >
>
> --
> Flavio Gomes
> flavio@xxxxxxxxxxxxxxxx
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20060828/20d06e22/attachment.html