Running ajax request in a loop

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raknin
    New Member
    • Oct 2007
    • 82

    Running ajax request in a loop

    Hi,

    I have html page that part of it is static and part of it changing continuously. What I want to do is, in the static part of the page I want to run an hidden ajax script in a loop that run in the background and checks continuously the DB for some information, while the active part of the page is changing continuously by the user. If the information is set in the DB, I want the user to get notification, as a OK CANCEL BOX. Can I get an example of such a script?
    Thanks
    Ronen
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    hi ...

    please show the code you have so far relating to that problem ...

    kind regards

    Comment

    • raknin
      New Member
      • Oct 2007
      • 82

      #3
      1) Just a basic question. How can I run javascript in the background
      2) How can I simulate a button press automatically.

      Comment

      • raknin
        New Member
        • Oct 2007
        • 82

        #4
        About 1) I found the solution. Call the same function from the same function with timeout function.

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Originally posted by raknin
          2) How can I simulate a button press automatically.
          Use the click() method.

          Comment

          • raknin
            New Member
            • Oct 2007
            • 82

            #6
            Thanks acoder for your help

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              No problem. You're welcome.

              Comment

              Working...