Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

SharePoint and anchor tages

Avatar of allanmark
allanmark asked on
HTMLMicrosoft SharePoint
18 Comments1 Solution2370 ViewsLast Modified:
Greetings all

I was recently asked if it is possible to have a page with anchor tags that point to links on another page, when the link is clicked, control flows to the corresponding section on the designated page  ... a simple exercise I thought.

I added Content Editor web parts onto each page and dumped the HTMl into these.

Everything works fine, except that it scrolls back to the top of the page, after going to the designated section.

My code is attached.
CODE FROM THE "CALLING" PAGE CONTENT EDITOR WEB PART:
=====================================================

<h3>First</h3>
<p>blah .. blah .. blah</p>
<a href="/News-Test-One.aspx#first">Linking to First on other page</a>
 <br/>
 <h3>Second</h3>
<p>blah .. blah .. blah</p>
<a href="/News-Test-One.aspx#second">Linking to Second on other page</a> 
<br/>
<h3>Third</h3>
<p>blah .. blah .. blah</p>
<a href="/news/Pages/News-Test-One.aspx#third">Linking to Third on other page</a> 
<br/>
<h3>Fourth</h3>
<p>blah .. blah .. blah</p>
<a href="/news/Pages/News-Test-One.aspx#fourth">Linking to Fourth on other page</a> <br/>



CODE FROM THE "CALLED" PAGE CONTENT EDITOR WEB PART:
===================================================

<a name="first">11111</a> 
<h1>First</h1>
<h2>First</h2>
<h3>First</h3>
<h4>First</h4>
<h2>First</h2>
<h3>First</h3>
<h4>First</h4>
<a name="second">2222222</a> 
<h1>Second</h1>
<h2>Second</h2>
<h3>Second</h3>
<h4>Second</h4>
<h2>Second</h2>
<h3>Second</h3>
<h4>Second</h4>
<a name="third">33333333333333</a> 
<h1>Third</h1>
<h2>Third</h2>
<h3>Third</h3>
<h4>Third</h4>
<h2>Third</h2>
<h3>Third</h3>
<h4>Third</h4>
<a name="fourth">444444444444</a> 
<h1>Fourth</h1>
<h2>Fourth</h2>
<h3>Fourth</h3>
<h4>Fourth</h4>
<h2>Fourth</h2>
<h3>Fourth</h3>
<h4>Fourth</h4>
ASKER CERTIFIED SOLUTION
Avatar of tstritof
tstritof

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 18 Comments.
See Answers