Forum Moderators: open

Message Too Old, No Replies

Setting the focus when opening a php page

Iframe changes the page to show the page bottom first.

         

netchicken1

5:42 pm on Nov 8, 2006 (gmt 0)

10+ Year Member



On my message board I put a chatbox in an I Frame in the bottom left of the page, this is below the screen depth of the page, it the only place it can go.

However in IE7 (and probably lower) when I access that page now it loads with the focus on that iframe on the screen, so that you have to scroll up to see the top of the page.

It doesn't do this in Opera.

Not really acceptable when people come to the site.

Is there some way I can make the page load with the Top of the page on the screen, instead of the bottom?

Cheers

rocknbil

9:04 pm on Nov 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you look for # in the links?

file.php?this=that#bottom

netchicken1

5:29 am on Nov 9, 2006 (gmt 0)

10+ Year Member



Nope, just a simple IFrame include for an Ajax chat program.

The members on the board first noticed it,

is there something can can drag the focus back to the top of the board so the page loads with the top in view?

rocknbil

6:20 pm on Nov 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would think that this would work:

<a name="theTop" id=theTop"></a>

script.php?this=that#theTop

Don't name an anchor "top".