PDA

View Full Version : Need help with script I cant find.


jerry
11-08-2002, 03:03 PM
Can anyone help me with a script that I can't find.

I want the browser visiting my site to view the page from about 1/4 of the way down from the top.
In other words, when I open the splash page, the top of the page I see in the browser is really about 1/4 of the way down from the real top of the page.
The text at the top of the page is not visible right away to the person opening the splash page.
I hope I have made sense.
Thanks in advance to anyone who can help.
Jerry.

montroze
11-08-2002, 03:42 PM
Can't you just do up an image that will only be 1/2 of the page, then direct them to the real main page, either by keypress or timer, not sure why you would want to do this?

scoutt
11-08-2002, 06:29 PM
if the page is not long enough to make the borwser have scoll bars you won't be able to do what you want. if you do have scroll bars and it is enough, you could use some javascript to load the page to a link, like this

<a name="first">

and then just have the body have an onLoad() and it might work. but everytime you open this page if you have more on it it will do just this, never see the rest of the page.

and as montroze said, why would you want to.

kdjoergensen
11-08-2002, 06:36 PM
As scoutt said, except you do not need to wait for the onload event handler.. try this where you want the top of the page to appear:


<a name="startHere">
<script language="javascript">
<!--
if (window.location.href.indexOf("#startHere") < 0){
window.location.href = window.location.href+"#startHere"
}
//-->
</script>



Let me guess.. you are trying to avoid showing the advertisement put there by your webhost ?? :D
(I had a webhost shut me down for using above code, so proceed at own risk).

jerry
11-09-2002, 06:01 PM
Thanks, Montroze, Scoutt and Kdjoergenson for your reply.

I should have explained that on my splash page I have a graphic box with interactive hyperlink icons.
Thats all I want visitors to see.
But I also want to have search engine friendly text (not in a table) at the top of the page.
This text will not look good or make much sense to visitors, but will get me a higher rating on search engines.
Its not exactly cheating because it describes my website well, but I dont want anything except the graphic box visible to visitors unless they scroll up, which they never will once they see the icons/entry options.
I havent seen or heard of this being used before but I am sure someone else has thought of it.
I want to put the code just above the graphics box so that to visitors, that will be the top of the page and there will be no reason to think there is anything above the box.

Kdjoergenson, do you think the code you gave me will work for this?
Anyway I will try it,unless you think there will be a problem.
And thanks again all you guys for your help.

Jerry,www.venturacaststone.com

scoutt
11-09-2002, 08:02 PM
fair warning, if you hide text up top and have it describe your site and also have meta tags that do the same plus the text in the page that the user sees, is called SPAM and you will not be listed in the search engines. they frown on that big time. you can only have meta tags (which most search engines are abandoning) and the text on the page. search engines will read text in tables so that doesn't matter.