Welcome to WebmasterWorld Guest from 54.227.125.200

Forum Moderators: incrediBILL

Message Too Old, No Replies

iframed anchors in firefox - problem

iframed anchor firefox not working

     

tom91

9:22 pm on Feb 14, 2012 (gmt 0)



Hello,

I've the newest version of the following browsers:
Google Chrome
Opera
Internet Explorer
Firefox

And only firefox refuses to go directly to anchor which is located in a website loaded in iframe. The link however without iframe works. How can I solve this problem ?


<a href="page1.html#anchor1" target="iframe1">Iframed anchor link</a>

<table>
<tr>
<td>

<iframe name="iframe1" id="iframe1"></iframe>

</td>
</tr>
</table>

----------------------------------------------
page1.html:

<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<a name="anchor1">test</a>

penders

8:23 am on Feb 15, 2012 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Is page1.html the document inside the iframe?

tom91

8:55 am on Feb 15, 2012 (gmt 0)



It is

tom91

9:00 am on Feb 15, 2012 (gmt 0)



I've checked today again to see if it wasn't one-time thing, and I'm afraid its not.

The anchor itself (without iframe) wasn't working without a <!DOCTYPE>, after I've had added <!DOCTYPE> it started to working but still doesn't work in iframed window.

My focus now is to consider a following:
- iframe in table might cause a problem
- different doctypes
- anchors in table might not work

tedster

5:35 pm on Feb 15, 2012 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You could try adding an id attribute to the anchor - <a name="anchor1" id="anchor1">test</a>

tom91

5:43 pm on Feb 15, 2012 (gmt 0)



I found a problem, need solution now.

My iframe is very long and so no scrolling is required and firefox consider to transfer to an anchor only when there is scrolling-bar in iframe. It simply ignores the height =/

I'm not sure how to find solution for this problem yet.

tom91

6:14 pm on Feb 16, 2012 (gmt 0)



Hi again,

I'm struggling with trying to find a solution for the problem.
Here is a source code of the problem:

2 seperate pages:

index.html and subpage.html

subpage.html is loaded into iframe which is located in a [u]index.html[/u].

subpage.html has anchors at different heights of the website.

link to anchors are located in [u]index.html[/u].

index.html:
<a href="subpage.html#anchorTop" target="iframe1"></a>
<a href="subpage.html#anchorBottom" target="iframe1"></a>

<center>
<iframe height="1600"></iframe>
</center>

subpage.html

<center>
<a id="anchorTop" name="anchorTop"></a>
TOP OF THE WEBSITE
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<a id="anchorBottom" name="anchorBottom"></a>
Part at the bottom of the iframe.
Part not visible in the window but is loaded into iframe
</center>

**Remove or ADD <br> to make sure the text is not visible but the scroll bar in iframe is not showed.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month