Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
maguskrool #1
clearInterval() not working, problem with scope
Hi.
I have the following javascript code:
var ivScroll;
function scrollHoriz (nScrollX)
{
if (window.scrollX < nScrollX) {
window.scrollBy(10, 0);
} else {
clearInterval (ivScroll);
}
}
function scrollMe (nScrollX, nInterv)
{
nInterv = setInterval ("scrollHoriz("+nScrollX+")", 10);
}
When I do scrollMe (300, ivScroll), the part where it should clear the
interval doesn't work. I've checked and it does get to the else clause, so the
problem is that the ivScroll variable being used is not the one I defined
globally. I'm fairly new to javascript, so can someone please solve this scope
problem for me? Thank you.
Jo?o
maguskrool Guest
-
Session scope not working from localhost
I installed CF7 recently, and have not been able to get the session scpoe to work properly - Session variables work from any remote machine when I... -
Problem with sessions (in global scope vs class scope)
Hello, i'me having a wierd problems with sessions. PHP 4.3.3, Register globals is on, and the sessions module is installed. if i have a page like... -
#26173 [Opn->Bgs]: Global vs function scope problem?
ID: 26173 User updated by: myle34 at hotmail dot com Reported By: myle34 at hotmail dot com -Status: Open +Status: ... -
#26173 [Opn]: Global vs function scope problem?
ID: 26173 User updated by: myle34 at hotmail dot com Reported By: myle34 at hotmail dot com Status: Open Bug Type: ... -
#26173 [NEW]: Global vs function scope problem?
From: myle34 at hotmail dot com Operating system: Windows XP Home PHP version: 5.0.0b2 (beta2) PHP Bug Type: Variables...



Reply With Quote

