AllExperts > Experts 
Search      

Javascript

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Javascript Answers
Question Library

Ask a question about Javascript
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Anthony Levensalor
Experience
I have been programming in Java and Javascript since 1998. I run a web development company that specializes in Ajax front ends with PHP/MySQL back ends. I am a Sun Certified Java 2 Developer, and have done nothing but web applications for the last two years in my business

Past/Present clients
Monster.com, Compuware Corporation, Flextronics International, Pragmatech Software, Open Travel Software, The Loss Mitigation Institute, Raw Story Media, Page One News Media.

 
   

You are here:  Experts > Computing/Technology > Focus on JavaScript > Javascript > need some way to have page open 1/3 down on the page

Topic: Javascript



Expert: Anthony Levensalor
Date: 11/8/2007
Subject: need some way to have page open 1/3 down on the page

Question
HI I hope you can help me. I am sure there is some easy way to do this but I can't seem to find it. What I want to do is when a page is opened in a browser is to have it open about 1/3 down on the page.

An example of a page I want to do this is here http://www.greatcarolinaproperty.com/farms/160400a.htm I want to be able to override it opening on the top where all my links are and open where the picture is on top. Now you may ask why don't I just design the picture at the top of the page but I need those links for many reasons including Search engine optimization. It is just every time you want to look at another picture on another page you have to scroll down each time . Any way to do this simply?
Thanks Susan :)

Answer
I absolutely understand, and this is pretty easy to do once you know how. :)

Specify an anchor tag (<a>) where you want the page to go to:

E.g.,
<a name="mainImage"><img src="......" /></a>

Or you can apply it to the title of the thing, or just a space, like so:

<a name="startHere"> </a>Western North Carolina Farm ..... $2,045,000
Riverfront!

Once that anchor is created, to navigate directly to it simply link to this url:

http://www.greatcarolinaproperty.com/farms/160400a.htm#startHere

That "#" and the name of the anchor on the end will load the page then jump down to the anchor, if it exists. If the anchor doesn't exist on the page, it will just stay at the top.

If you need any further help with this, please do let me know, I hope this helps solve your issue.

All the best,
~A!

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.