Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which frame is in focus

Status
Not open for further replies.

arunjp

Programmer
Jan 10, 2001
29
US
Hi !
I have a page that loads multiple (five) frames. Is there any way to know that which frame has the focus at the current time. When I scroll(vertical) the bottom right frame, the bottom left frame should also scroll, so I implemented the scroll event method in both the pages to make both are in sync. But the problem is, when I scroll any of the frames, the scrollbar of both the frames does not stop until it reaches down. I figured out the problem, that is when I scroll the right frame, it calls the left frame's scroll method and vice versa, so both the functions get called until the scroll bar reaches down. It should be solved by knowing which frame's scroll bar is moved. It is possible only if I know which frame is in focus. Early solution is appreciated.

Thanks
AJP
 
Send us a link to your page! hehe my imagination isn't what it used to be.
 
Hi !
I couldn't understand what u mean. My requirement is :
1. To get the name of the frame which has got the focus.

2. To call a function when scroll bar in one frame is cliked using mouse.

Thanks
AJP
 
What I mean is, send a link so we can see what you've got. Its a lot easier to determine whats missing once I see a page.



 
Yeah, I can't think of any way to do this - there is no provision for it that I can find so what about something like:
...
onFocus='frameInFocus="this.name"'

...

By putting this in the frame tags - set a variable which holds the current frame in focus.
b[sup]2[/sup] - benbiddington@surf4nix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top