Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Active element
- From: javascript@xxxxxxxxxx (Dan Costea)
- Subject: [Javascript] Active element
- Date: Thu, 23 May 2002 08:20:03 -0700
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@xxxxxxxxxx>
To: <javascript@xxxxxxxxxx>
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@xxxxxxxxxx]
> Sent: Thursday, 23 May 2002 1:22 PM
> To: 'javascript@xxxxxxxxxx'
> 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@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
- References:
- [Javascript] Active element
- From: Andrew Dunn
- [Javascript] Active element
- Prev by Date: [Javascript] How to refresh opener window ??
- Next by Date: [Javascript] RegExp for positive integer
- Previous by thread: [Javascript] Active element
- Next by thread: [Javascript] How to refresh opener window ??
- Index(es):