[Javascript] Active element
Dan Costea
costea.dan at ssi-schaefer.ro
Thu May 23 10:20:03 CDT 2002
don't use the loop:
while(keepscrolling == "true") {
parent.main.scrollBy(1,0);
}
Use a function call instead: startScrolling ();
And this function can be defined like this:
function startScrolling ()
{
parent.main.scrollBy(2,0);
if ("true" == keepscrolling)
setTimeout ("startScrolling ()", 30);
}
that should work.
Dan.
----- Original Message -----
From: "Andrew Dunn" <andrew at d2k.com.au>
To: <javascript at LaTech.edu>
Sent: Wednesday, May 22, 2002 8:58 PM
Subject: RE: [Javascript] Active element
> Here is some more info on this question:
>
> I have a frame that I want to scroll when the user puts the mouse over an
> element, I have this function:
>
> var keepscrolling;
>
> function scroll(direction) {
> keepscrolling = "true"
> if (direction == "right") {
> while(keepscrolling == "true") {
> parent.main.scrollBy(1,0);
> }
> }
> else {
> parent.main.scrollBy(-1,0);
> }
>
>
> I can't figure out how to get the variable "keepscrolling" to turn to
false.
> I have tried making it false onmouseout but it doesn't seem to receive any
> events when it is in that loop.
>
> Can anyone help me?
>
> Thanks.
>
>
> -----Original Message-----
> From: Andrew Dunn [mailto:andrew at d2k.com.au]
> Sent: Thursday, 23 May 2002 1:22 PM
> To: 'javascript at LaTech.edu'
> Subject: [Javascript] Active element
>
>
>
> Hi,
> how do you tell what element on a page is active? Or if a mouse if
> over an element is what I want to do. Thanks.
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list