Solved

Link to Bookmark Disappears

Posted on 2014-01-29
2
479 Views
Last Modified: 2014-02-02
I am creating an email blast for a client, and we want to land on a particular bookmark on a page. So I am linking to http://www.mesila.org/show.asp?PID=17#Video2
However, when the page opens up, the beginning/top of the page is displayed and after a few moments the #Video2 disappears from the URL bar.

I thought this might have to do with www.addthis.com, which has JavaScript that modifies the URL. But the same thing happens when I remove this code. It also happens in both FF and MSIE. It does not happen if I am already on the page, and I just add the #Video1 or #Video2 to the URL bar.

Why might this be happening? How can I link to these bookmarks properly?

Thank you.
0
Comment
Question by:Lev Seltzer
2 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39817881
Looks like this frame breaker code:

<script type="text/javascript">
var thisPage = "http://www.mesila.org" + self.location.pathname + self.location.search;
if (top.location != thisPage)
top.location = thisPage;
</script>

is causing the redirection.

You need to add self.location.hash to the string for the page name.

Cd&
0
 

Author Closing Comment

by:Lev Seltzer
ID: 39827686
thank you. I did not realize this code was there, and I decided to simply remove it. I would need to put in some extra logic before putting in self.location.hash, because most pages would NOT have a hash code.

Thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question