Solved

Link to Bookmark Disappears

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
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…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

707 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

15 Experts available now in Live!

Get 1:1 Help Now