HTML body tag question

liunx

Guest
Hi Everyone,<br />
<br />
Ok... I have a huge text within the HTML body tags which cause the vertical scroll bar to appear. The question is, is there anyway to force the scrollbar to display the lower part of the text when the HTML is shown on the browser? If not...<br />
<br />
There is another option, but I still have the same problem with scrollbars. I can use textarea, but I don't know of a way to force the vert scrollbar in the textarea to show the bottom half when the HTML first appears on the browser. <br />
<br />
Any help will be appreciated.<!--content-->I can think of three ways, but it requires some script.<br />
<br />
(1) Put a named anchor (<A NAME="bottom">) at the bottom of the text and use a script to go to that anchor by changing window.location.hash.<br />
<br />
(2) Use the function scrollTo(x,y) with a ridiculously high number for the x coordinate.<br />
<br />
(3) place a form with a textbox at the bottom of the page and use document.formName.textBoxname.focus().<br />
<br />
If you don't want to use script, then you can use #1 and change the link in the referring page to go to the anchor.<!--content-->Thanks for the info gil_davis, but how do I set the window.location.hash? I have already place the anchor at the end of the text. Now I just need to know how to use the window.location.hash. <br />
<br />
I don't think I can use the link (href) since this body is automatically refresh every 10 secs and I don't have a link to point to this.<!--content-->If you have an anchor named "foo" (<a name="foo" id="foo"></a>), you can use something like this:<br />
<br />
<script type="text/javascript"><br />
window.onload = function() { window.location.hash = "foo"; }<br />
</script><!--content-->
 
Back
Top