James Killar

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromJames Killar
ToMe
Subjectweb page loads in middle of browser.
Date11 November 2004 16:31
hi...possibly an easy solution for an old hand as yourself...I have created
a very basic site using Dreamweaver, ASP and a smattering of java and VB
script tied in with some HTML.

the problem I have is that when you go to the website and it loads up in
your browser, it doesn't load to the top of the browser...more like halfway
down...you have to use the scroll bar to move to the top of the page...
frustrating for viewers...

I probably can't see the forest for the trees...

I have certainly tried the usual google search etc to no avail

hoping that you may be able to help or possibly point in another direction
of assistance

anyway...the site is

[site with the peoblem]

many thanks for your time

James
FromMe
ToJames Killar
SubjectRe: web page loads in middle of browser.
Date11 November 2004 22:11
James,

well, I don't see the problem. Tried Opera, FireFox, IE 5.5.

However, I can see a bizzare little script in there.

> winHeight=document.all['bodyArea'].offsetHeight;
1) there is no element with this ID in the document
2) Not all browsers support document.all

> window.resizeTo(winWidth+30,winHeight+60);
even if the browser does not support document.all, it still tries to
resize. the variables have not been defined, this will cause an error

> window.moveTo(...etc...,...etc...);
and here is the problem.

You have no need for any of this script. remove it. Remove the entire
script block:
<script .....
etc etc
</script>
All of that. just delete it.

Then delete the onLoad="resizeWin();" attribute from the body tag.

That should be all. it should now work properly. Hope this helps.

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.