Welcome to WebmasterWorld Guest from 35.175.191.168

Forum Moderators: open

Message Too Old, No Replies

Can't Get Focus on Frames Page

     
2:26 am on Nov 25, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Feb 24, 2002
posts:327
votes: 0


When you go to one of my non-frames pages you can use your down arrow key to scroll down the page as soon as the page displays. But on my frames page, I have to click on it first.

<frameset rows="100%,*" frameborder=no border=0 framespacing=0>
<frame name="image" src="index_image.html" scrolling=yes>
<frame name="create" src="index_loss_create.html" scrolling=no>
</frameset>

As you can see "image" fills the whole screen. After I click on it the down arrow key works fine, and I believe the wheel on a mouse (I don't have one) works the same way.

I tried:

window.focus(parent.image);

but it did nothing. Any ideas? I should think anyone using frames would be concerned with this.

Thanks, Peter

3:22 pm on Nov 25, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 20, 2002
posts:3732
votes: 0


Where are you calling the javascript?
3:32 pm on Nov 25, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Feb 24, 2002
posts:327
votes: 0


I solved it with image.focus().

My books just don't give examples so I have problems with syntax.

Thanks, Peter