keep ajax connecting ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smartic
    New Member
    • May 2007
    • 150

    keep ajax connecting ?

    how can i make the ajax code keep connecting until it gets data from the server ,in my example i'm using ajax and php in simple chat baord to get new messages from the database and send the new message to the page by ajax how can i do that ?
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you have to poll the data periodically from your webpage with an ajax call ...

    kind regards

    Comment

    • smartic
      New Member
      • May 2007
      • 150

      #3
      i used this technique but i want to keep it connecting until it gets data from the PHP how can i do that?

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        you simply cannot have a persistent connection from a webpage via http ... every ajax call has a response ... even when it is empty ... please explain exactly what you mean and whatfor you need that ... perhaps with an example.

        kind regards

        Comment

        Working...