forum

Home / DeveloperSection / Forums / how do you set interval to ajax call in jquery

how do you set interval to ajax call in jquery

Anonymous User470508-Jul-2013
Hi Developers!

I need to create an ajax call every 5 minutes. I have to below code. Can someone tell me how would I modify this code to run that ajax every 5 minutes?

    $(document).ready(function() {
     var seriesOptions = [],
        yAxisOptions = [],
        colors = Highcharts.getOptions().colors;
        
$.ajax({
                    url: 'echo_file.php', 
                    datatype: 'json',
                    success: function(data) {
                        seriesOptions=data;
                        createChart();
                    },

                    cache: false    
                    });

       function createChart() {
    .
    .
    .
    }
});

Updated on 08-Jul-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By