Users Pricing

forum

Home Forums how do you set interval to ajax call in jquery – MindStick

how do you set interval to ajax call in jquery

Anonymous User 5104 08 Jul 2013

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() {
    .
    .
    .
    }
});

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md