I have 2 different jsp pages i need to call those one by one
like slide show.
so my code is
function switchPages(){ //here common function to call from my jsp file
setInterval(pageOne, 20000);
setInterval(pageSecond, 20000);
}
function pageOne(){
var path='graph1.jsp';
window.location.href = path;
}
function pageSecond(){
var path='graph2.jsp';
window.location.href = path;
}
it gets an ambiguity when my setInterval is called. can somebody help me.
Thanks in Advance
You can use setTimeout instead: