1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need help with jquery ajax function in loop. will pay $15 to get this solved

Discussion in 'jQuery' started by whitesky82, Jan 21, 2014.

  1. #1
    Hello,

    i had a php script with call other php page via jquery ajax to get the content. Now this page call the other page serveral time in mysql while loop. Somehow its making my ajax to run again and again.
    SEMrush
    I can explain better by providing files if anyone can help me to get thsi resolved or guide me to a better process.

    thanks
     
    whitesky82, Jan 21, 2014 IP
    SEMrush
  2. Johnnt Nguyen

    Johnnt Nguyen Member

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #2
    You can using jquery for post or get in loop with setInterval

    Example:
    setInterval(function() {
          $.get( "ajax/test.php", function( data ) {
               //some code here
          });
    }, 5000);
    Code (markup):
    This code load file test.php every 5 seconds (5000 miliseconds), you can setting in here for low time loop.

    Hope this help
     
    Johnnt Nguyen, Jan 22, 2014 IP
  3. webshore88

    webshore88 Active Member

    Messages:
    130
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    73
    #3
    Let me see the file if you still have that problem
     
    webshore88, Feb 7, 2014 IP