The function whenCompleted(); is executed after an ajax call is complete.
function whenCompleted(){
var intVal = 0;
intVal = setInterval ( function(){
sIFR.replace(verlag, {
selector: 'h2',
css: '.sIFR-root { color: #000000; }',
wmode: 'transparent'
});
}, 100 );
if(intVal)
setTimeout ("clearInterval(intVal)", 1500 );
}
When the page is loaded, it indeed calls the function every 100 milliseconds as it should, but then 1500 milliseconds later instead of clearing the interval it spits out the error: intVal is not defined.
Am I missing something? It obviously acknowledges intVal in the if(intVal) so why doesn't it acknowledge it in the next line?
--S--

New Topic/Question
Reply



MultiQuote






|