Mozilla Support में खोजें

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Links to id's and named anchors within a page in an iframe do not open in firefox

  • 4 प्रत्युत्तर
  • 1 यह समस्या है
  • 23 views
  • के द्वारा अंतिम प्रतियुतर Zoidman

more options

In order to force layout of my liquid website, I use i-frames to display content . It is all on my sight www.rdelutherie.com, and I am not displaying pages from other sights. The links to sections of pages from within the same page do not work in firefox.

I have had this problem before with named anchors, and in moving up to html5 and in making my site accessible for people with dissabilities, I started using <nav> eliments... and changed from named anchors to links to ID's like this:

In an unordered list I have these:

	<li><a href="#s1">Subject 1:</a></li>

They link to sections of the same page like this one:

	<section id=s1>
		<h2>Subject 1:</h2>
		<p>Blah blah blaaaaah, and bla bla!</p>
	</section>

Last time I researched this problem (a year or more ago), I was told that it was because of a security risk (something about being able to count views...and other peoples proprietary and copyrighted material), but the vaguely described reasoning made little to no sense to me nor many others, who can not even link to our own stuff. The Mozilla developers were rather abrupt and some were even rude in telling us to live with it, instead of trying to come up with a solution or work around, and closed the post and disallowed further posting.

The problem still persists, and although I am not a programmer, I have a real hard time believing that it is impossible for Firefox to distinguish between links contained within a document and site, from those on different sights, domains and what have you.

As far as I know, no other browsers have this problem, so if it is such a big security risk, what is to stop someone with malicious intentions, from just using M$ IE, to bring their evil plan to fruition?

In keeping with "Making the web a better place": Please address this problem, and find a solution, workaround, or at least explain why it is impossible.

Bob English

In order to force layout of my liquid website, I use i-frames to display content . It is all on my sight www.rdelutherie.com, and I am not displaying pages from other sights. The links to sections of pages from within the same page do not work in firefox. I have had this problem before with named anchors, and in moving up to html5 and in making my site accessible for people with dissabilities, I started using &lt;nav&gt; eliments... and changed from named anchors to links to ID's like this: In an unordered list I have these: <pre><nowiki> <li><a href="#s1">Subject 1:</a></li> </nowiki></pre> They link to sections of the same page like this one: <pre><nowiki> <section id=s1> <h2>Subject 1:</h2> <p>Blah blah blaaaaah, and bla bla!</p> </section></nowiki></pre> Last time I researched this problem (a year or more ago), I was told that it was because of a security risk (something about being able to count views...and other peoples proprietary and copyrighted material), but the vaguely described reasoning made little to no sense to me nor many others, who can not even link to our own stuff. The Mozilla developers were rather abrupt and some were even rude in telling us to live with it, instead of trying to come up with a solution or work around, and closed the post and disallowed further posting. The problem still persists, and although I am not a programmer, I have a real hard time believing that it is impossible for Firefox to distinguish between links contained within a document and site, from those on different sights, domains and what have you. As far as I know, no other browsers have this problem, so if it is such a big security risk, what is to stop someone with malicious intentions, from just using M$ IE, to bring their evil plan to fruition? In keeping with "Making the web a better place": Please address this problem, and find a solution, workaround, or at least explain why it is impossible. Bob English

cor-el द्वारा सम्पादित

All Replies (4)

more options

Could you be more specific about how to find a non-working link on the site? Everything I click loads a new page.

more options

Thanks for responding jscher2000,

There's another problem right there: Linking to pages in iframes but not being able to also load the parents (two tiers).

from my home page navigate to "Recycled instruments" (from left menu) the page that loads has a menu on the right, click on "ES 3350" (may be slow to load, still working on splitting the page into multiples). If you scroll down past the first few pictures you will see the List. It has links to subtopics within the document.

It is the only document like that on the sight, as I am not yet done updating the rest of them.

I can assure you that besides me having a strange way of coding (not my specialty) there is nothing wrong with the related code, It is Firefox for sure.

more options

Hi Zoidman, there are a couple of things going on here at the same time but the two that seem critical are:

(1) Firefox will only scroll a framed page to an anchor if the full page is not displayed. You have set the iframe height to the same height as the framed document, so nothing appears to happen when you click the link.

If you reduce the height on the iframe and then click the link, you will see the framed document move. The amount of movement depends on the height of the frame: the document can't move up far enough to bring the anchor into view once the bottom of the document has been scrolled up to the bottom of the iframe.

(2) Firefox also doesn't scroll the parent document when you click a link that navigates to an anchor in a framed document.

A possible JavaScript solution is outlined in this post (his demo works for me, but I don't know whether it will work in your layout): http://matthewmanela.com/blog/making-linking-between-anchors-in-an-iframe-work-in-firefox-11-and-above/

more options

Thanks again jscher2000, I know exactly what you mean, but I have had other page display problems with adjacent columns where one side does not display completely and seems to be conforming to the other ones height... hence the height settings and other tricks to force things to be acceptable.

I am far from understanding code, and most of the solutions, including the one in the link you posted do not have the information a novice like me would need to implement them successfully. Most of them are written for people much more advanced. Without it telling me where exactly to put the code, point to it, what I can (and should) change and remove elsewhere because of it... I am at a loss. I don't know the basics, and have tried hard to understand them, but it is not like electrical circuits, physics and other things that I can understand naturally and with ease.

 I will look into it further in a few days, meanwhile I have to attend to my real work that doesn't even pay the bills completely: guitar building and repair, now that comes easy and naturally to me!

Zoidman द्वारा सम्पादित