Solved

Link to Bookmark Disappears

Posted on 2014-01-29
2
462 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Message not shown 5 33
Capture logon name 13 46
Opening PDF on button click and fill new document 2 21
Angular - disable input field on page load 4 14
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

895 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now