I need to call a function with in 30 seconds when I initially load the page. Thereafter it should be called in 60 seconds automatically.
What i did is,
<html>
<head>
</head>
<body>
<script>
setTimeout('ajaxload()',30000);
setInterval('ajaxload()',60000);
function ajaxload()
{
//code
}
</script>
</body>
</html>
But The function is called in irregular times, i think. Am I doing correct? If any mistake kindly share….
You are using it a bit incorrectly. If the first one is at 30 secs and thereafter at 60 secs you should do it in sequence.